perm filename APPEND.TEX[WEB,ALS] blob
sn#725590 filedate 1983-10-28 generic text, type C, neo UTF8
COMMENT ⊗ VALID 00008 PAGES
C REC PAGE DESCRIPTION
C00001 00001
C00002 00002 \font\ninerm=cmr9 \font\eightrm=cmr8 \font\sixrm=cmr6 \font\mc=cmcsc
C00004 00003 \def\smallerskip{\vskip 2pt plus 1pt minus 1pt}
C00018 00004 \leftline{Macros for setting ordinary text}
C00027 00005 \centerline {\bf Appendix}
C00057 00006 \beginchapter Appendix B. Basic\\Control\\Sequences
C00187 00007 \beginchapter Chapter 24. Summary of\\Vertical\\Mode
C00280 00008
C00281 ENDMK
C⊗;
\font\ninerm=cmr9 \font\eightrm=cmr8 \font\sixrm=cmr6 \font\mc=cmcsc
\font\seal=stan70
\def\TEX{T\kern-.1667em\lower.5ex\hbox{E}\kern-.125em X}
\def\TeX{T\kern-.1667em\lower.5ex\hbox{E}\kern-.125em X}
\def\BoX{B\hbox{\hskip-.05em\raise.35ex\hbox{o}\hskip-.1667em X}}
\def\GLue{GL\hbox{\hskip-.1667em\raise.54ex\hbox{ue}}}
\magnification=1200
\def\DVI{{\mc DVI}}
\def\undertext#1{$\underline{\hbox{#1}}$}
\def\\{{\tt \char'134}}
\def\up{{\sy \char'42}}
\def\down{{\sy \char'43}}
\def\caret{{\char'17}}
% \def\&{{\char'46}}
\parskip 10pt plus 1pt
\parindent 0pt
%\count0 0
\def\cs{{\sl control sequence}}
\def\css{{\sl control sequences}}
\def\Css{{\sl Control sequences}}
\pageno=33
\headline={\hfil} % headline is normally blank
\footline={\hss\tenrm\folio\hss}
%\vsize=9.0 truein
%\null \vskip-50pt
\def\sep{\medskip\hrule width\hsize\medskip}
\def \dsep{\vskip-5pt\line{\dotfill}\smallskip}
\def\smallerskip{\vskip 2pt plus 1pt minus 1pt}
\null\vskip-30pt
%\vsize=9.2 truein
Miscellaneous special symbols, available in Math mode
\smallerskip
\halign{\hfil#\hfil\quad&\tt #\hfil\qquad\qquad&
\hfil#\hfil\quad&\tt #\hfil\qquad\qquad&
\hfil#\hfil\quad&\tt #\hfil\cr
$\aleph$&{\tt \\aleph}&$\prime$&{\tt \\prime}&$\forall$&{\tt \\forall}\cr
$\hbar$&{\tt \\hbar}&$\emptyset$&{\tt \\emptyset}&$\exists$&{\tt \\exists}\cr
$\imath$&{\tt \\imath}&$\nabla$&{\tt \\nabla}&$\neg$&{\tt \\neg}\cr
$\jmath$&{\tt \\jmath}&$\surd$&{\tt \\surd}&$\flat$&{\tt \\flat}\cr
$\ell$&{\tt \\ell}&$\top$&{\tt \\top}&$\natural$&{\tt \\natural}\cr
$\wp$&{\tt \\wp}&$\bot$&{\tt \\bot}&$\sharp$&{\tt \\sharp}\cr
$\Re$&{\tt \\Re}&$\Vert$&{\tt \\Vert}&$\clubsuit$&{\tt \\clubsuit}\cr
$\Im$&{\tt \\Im}&$\angle$&{\tt \\angle}&$\diamondsuit$&{\tt \\diamondsuit}\cr
$\partial$&{\tt \\partial}&$\triangle$&{\tt \\triangle}&$\heartsuit$&{\tt \\heartsuit}\cr
$\infty$&{\tt \\infty}&$\backslash$&{\tt \\backslash}&$\spadesuit$&{\tt \\spadesuit}\cr
\noalign{\vskip -2pt}
%\noalign{\smallerskip}
\noalign{Binary operators (in addition to $+$, $-$, and $*$) available in Math mode}
\noalign{\smallerskip}
$\pm$&{\tt \\pm}&$\cap$&{\tt \\cap}&$\vee$&{\tt \\vee}\cr
$\mp$&{\tt \\mp}&$\cup$&{\tt \\cup}&$\wedge$&{\tt \\wedge}\cr
$\setminus$&{\tt \\setminus}&$\uplus$&{\tt \\uplus}&$\oplus$&{\tt \\oplus}\cr
$\cdot$&{\tt \\cdot}&$\sqcap$&{\tt \\sqcap}&$\ominus$&{\tt \\ominus}\cr
$\times$&{\tt \\times}&$\sqcup$&{\tt \\sqcup}&$\otimes$&{\tt \\otimes}\cr
$\ast$&{\tt \\ast}&$\triangleleft$&{\tt \\triangleleft}&$\oslash$&{\tt \\oslash}\cr
$\star$&{\tt \\star}&$\triangleright$&{\tt \\triangleright}&$\odot$&{\tt \\odot}\cr
$\diamond$&{\tt \\diamond}&$\wr$&{\tt \\wr}&$\dagger$&{\tt \\dagger}\cr
$\circ$&{\tt \\circ}&$\bigcirc$&{\tt \\bigcirc}&$\ddagger$&{\tt \\ddagger}\cr
$\bullet$&{\tt \\bullet}&$\bigtriangleup$&{\tt \\bigtriangleup}&$\amalg$&{\tt \\amalg}\cr
$\div$&{\tt \\div}&$\bigtriangledown$&{\tt \\bigtriangledown}\cr
\noalign{\vskip -2pt}
\noalign{Relations (in addition to $<$, $>$, and $=$), available in Math mode}
\noalign{\smallerskip}
$\leq$&{\tt \\leq}&$\geq$&{\tt \\geq}&$\equiv$&{\tt \\equiv}\cr
$\prec$&{\tt \\prec}&$\succ$&{\tt \\succ}&$\sim$&{\tt \\sim}\cr
$\preceq$&{\tt \\preceq}&$\succeq$&{\tt \\succeq}&$\simeq$&{\tt \\simeq}\cr
$\ll$&{\tt \\ll}&$\gg$&{\tt \\gg}&$\asymp$&{\tt \\asymp}\cr
$\subset$&{\tt \\subset}&$\supset$&{\tt \\supset}&$\approx$&{\tt \\approx}\cr
$\subseteq$&{\tt \\subseteq}&$\supseteq$&{\tt \\supseteq}&$\cong$&{\tt \\cong}\cr
$\sqsubseteq$&{\tt \\sqsubseteq}&$\sqsupseteq$&{\tt \\sqsupseteq}&$\bowtie$&{\tt \\bowtie}\cr
$\in$&{\tt \\in}&$\ni$&{\tt \\ni}&$\propto$&{\tt \\propto}\cr
$\vdash$&{\tt \\vdash}&$\dashv$&{\tt \\dashv}&$\models$&{\tt \\models}\cr
$\smile$&{\tt \\smile}&$\mid$&{\tt \\mid}&$\doteq$&{\tt \\doteq}\cr
$\frown$&{\tt \\frown}&$\parallel$&{\tt \\parallel}&$\perp$&{\tt \\perp}\cr
\noalign{\vskip -2pt}
%\noalign{\smallerskip}
\noalign{Negated relations (the \\not symbol is considered to have zero width)}
\noalign{\smallerskip}
$\not<$&{\tt \\not<}&$\not>$&{\tt \\not>}&$\not=$&{\tt \\not=}\cr
$\not\leq$&{\tt \\not\\leq}&$\not\geq$&{\tt \\not\\geq}&
$\not\equiv$&{\tt \\not\\equiv}\cr
$\not\prec$&{\tt \\not\\prec}&$\not\succ$&{\tt \\not\\succ}&
$\not\sim$&{\tt \\not\\sim}\cr
$\not\preceq$&{\tt \\not\\preceq}&$\not\succeq$&{\tt \\not\\succeq}&
$\not\simeq$&{\tt \\not\\simeq}\cr
$\not\subset$&{\tt \\not\\subset}&$\not\supset$&{\tt \\not\\supset}&
$\not\approx$&{\tt \\not\\approx}\cr
$\not\subseteq$&{\tt \\not\\subseteq}&$\not\supseteq$&{\tt \\not\\supseteq}&
$\not\cong$&{\tt \\not\\cong}\cr
$\not\sqsubseteq$&{\tt \\not\\sqsubseteq}&$\not\sqsupseteq$&{\tt \\not\\sqsupseteq}&
$\not\asymp$&{\tt \\not\\asymp}\cr}
\eject
\bye
\leftline{Macros for setting ordinary text}
\vskip-20pt
$$\vbox{\halign{#\hfil\quad&\hfil\quad\cr
\\frenchspacing&\\break&\\bigbreak&\\hidewidth&\\ttraggedright\cr
\\nonfrenchspacing&\\nobreak&\\line&\\multispan\#1&\\leavevmode\cr
\\normalbaselines&\\allowbreak&\\leftline\#1&\\cleartabs&\\hrulefill\cr
\\null&\\filbreak&\\rightline\#1&\\hang&\\dotfill\cr
\\obeyspaces&\\goodbreak&\\centerline\#1&\\textindent\#1&\\downbracefill\cr
\\loop\#1\\repeat&\\eject&\\rlap\#1&\\item&\\upbracefill\cr
\\iterate&\\supereject&\\llap\#1&\\itemitem\cr
\\nointerlineskip&\\smallbreak&\\underbar\#1&\\narrower\cr
\\offinterlineskip&\\medbreak&\\strut&\\raggedright\cr}}$$
\leftline{Macros for setting math}
$$\vbox{\halign{#\hfil\qquad&\hfil\qquad\cr
\\joinrel&\\vphantom&\\openup&\\cases\#1&\\ldots\cr
\\relbar&\\hphantom&\\eqalign\#1&\\matrix\#1&\\cdots\cr
\\Relbar&\\phantom&\\displaylines\#1&\\pmatrix\#1&\\vdots\cr
\\bowtie&\\mathstrut&\\eqalignno\#1&\\bordermatrix\#1&\\ddots\cr
\\models&\\smash&\\leqalignno\#1\cr}}$$
\leftline{Parameters preset by {\tt PLAIN.TEX} that may be reset, with caution}
$$\vbox{\halign{#\hfil\qquad&\hfil\qquad\cr
\\vbadness=1000&\\tracinglostchars=1&\\delimitershortfall=5pt\cr
\\linepenalty=10&\\uchyph=1&\\nulldelimiterspace=1.2pt\cr
\\hyphenpenalty=50&\\newlinechar=-1&\\scriptspace=0.5pt\cr
\\exhyphenpenalty=50&\\delimiterfactor=901&\\parindent=20pt\cr
\\binoppenalty=700&\\showboxbreadth=5&\\parskip=0pt plus 1pt\cr
\\relpenalty=500&\\showboxdepth=3&\\topskip=10pt\cr
\\hbadness=1000&\\adjdemerits=10000&\\maxdepth=4pt\cr
\\clubpenalty=150&\\hfuzz=0.1pt&\\thinmuskip=3mu\cr
\\widowpenalty=150&\\vfuzz=0.1pt&\\normalbaselineskip=12pt\cr
\\displaywidowpenalty=50&\\overfullrule=5pt&\\normallineskip=1pt\cr
\\brokenpenalty=100&\\hsize=6.5in&\\jot=3pt\cr
\\predisplaypenalty=10000&\\vsize=8.9in\cr}}$$
$$\vbox{\halign{#\hfil\quad&\hfil\quad\cr
\\doublehyphendemerits=10000&\\belowdisplayskip=12pt plus 3pt minus 9pt\cr
\\finalhyphendemerits=5000&\\belowdisplayshortskip=7pt plus 3pt minus 4pt\cr
\\parfillskip=0pt plus 1fil&\\smallskipamount=3pt plus 1pt minus 1pt\cr
\\medmuskip={\eightrm 4mu plus 2mu minus 4mu}&\\medskipamount=6pt plus 2pt minus 2pt\cr
\\thickmuskip=5mu plus 5mu&\\bigskipamount=12pt plus 4pt minus 4pt\cr
\\interdisplaylinepenalty=100&\\abovedisplayskip=12pt plus 3pt minus 9pt\cr
\\interfootnotelinepenalty=100&\\abovedisplayshortskip=0pt plus 3pt\cr}}$$
\leftline{Unassigned parameters, set to zero automatically}
$$\vbox{\halign{#\hfil\qquad&\hfil\qquad\cr
\\pausing&\\tracingparagraphs&\\tracingrestores&\\spaceskippt\cr
\\tracingonline&\\tracingpages&\\leftskippt&\\hoffsetpt\cr
\\tracingmacros&\\tracingoutput&\\rightskippt&\\voffsetpt\cr
\\tracingstats&\\tracingcommands&\\tabskippt\cr}}$$
\leftline{Fonts preloaded and named by{\tt PLAIN.TEX}}
\leftline{Can be magnified $\sqrt{1.2}$, $1.2$,
$(1.2)↑2$, $(1.2)↑3$, $(1.2)↑4$, and $(1.2)↑5$.}
$$\vbox{\halign{#\hfil \qquad\hfil\enskip\hfil\qquad&
#\hfil\enskip\hfil\qquad\hfil&\enskip#\hfil\cr
\rm roman text&\\tenrm&amr10&\\sevenrm&amr7&\\fiverm&amr5\cr
\teni math$\;$italic&\\teni&ammi10&\\seveni&ammi7&\\fivei&ammi5\cr
math symbols&\\tensy&amsy10&\\sevensy&amsy7&\\fivesy&amsy5\cr
math extension&\\tenex&amex10\cr
\bf boldface extended&\\tenbf&ambx10&\\sevenbf&ambx7&\\fivebf&ambx5\cr
\tt typewriter&\\tentt&amtt10\cr
\sl slanted roman&\\tensl&amsl10\cr
\it text italic&\\tenit&amti10\cr}}$$
\leftline{Fonts preloaded by {\tt PLAIN.TEX} but un-named}
$$\vbox{\halign{#\hfil\qquad\hfil\enskip\hfil\enskip\hfil\qquad\enskip&
#\hfil\qquad\hfil \enskip\hfil\cr
roman text&amr9&amr8&amr6&sans serif&amss10&amssq8\cr
math italic&ammi9&ammi8&ammi6&s.s.italic&amssi10&amssqi8\cr
math symbols&amsy9&amsy8&amsy6&slanted roman&amsl9&amsl8\cr
typewriter&amtt9&amtt8&&slanted typewr.&amsltt10 \cr
bold face&ambx9&ambx8&ambx6\cr
&amti9&amti8&amti7\cr}}$$
$$\vbox{\halign{#\hfil\quad\hfil\qquad\quad\hfil\quad\hfil\cr
unslanted text italic&amu10&Dunhill style&amdunh10\cr
bold math italic&ambi10&for titles&amr7 scaled \\magstep4\cr
bold math symbols&ambsy10&&amtt10 scaled \\magstep2\cr
caps and small caps&amcsc10&&amssbx10 scaled \\magstep2\cr
sans serif bold extended&amssbx10\cr}}$$
\leftline{Some Almost-Computer-Modern Fonts distributed by Stanford}
\leftline{Magnif. m0--m5 means magnification by $1$, $\sqrt{1.2}$, $1.2$,
$(1.2)↑2$, $(1.2)↑3$, $(1.2)↑4$, and $(1.2)↑5$.}
$$\vbox{\halign{#\hfil\quad\hfil\qquad\quad&
#\hfil\quad\hfil\qquad\hfil\quad\hfil\qquad\hfil\quad\hfil\cr
Name&Font&pt&Magnif.&pt&Magnif.&pt&magnif.\cr
\noalign{\smallskip}
amr&roman&10&m0--m5&9&m0--m2&8&m0--m2\cr
&&7&m0--m5&6&m0--m2&5&m0--m5\cr
ambx&bold extended&10&m0--m5&9&m0--m2&8&m0--m2\cr
&&7&m0--m5&6&m0--m2&5&m0--m5\cr
amsy&math symbols&10&m0--m5&9&m0--m2&8&m0--m2\cr
&&7&m0--m5&6&m0--m2&5&m0--m5\cr
ami&math italic&10&m0--m5&9&m0--m2&8&m0--m2\cr
&&7&m0--m5&6&m0--m2&5&m0--m5\cr
amti&text italic&10&m0--m5&9&m0--m2&8&m0--m2\cr
&&7&m0--m2\cr
amsl&slanted roman&10&m0--m5&9&m0--m2&8&m0--m2\cr
amtt&typewriter type&10&m0--m5&9&m0--m2&8&m0--m2\cr}}$$
$$\vbox{\halign{#\hfil\enskip\hfil\enskip\hfil\qquad\hfil\enskip\hfil\enskip\hfil\cr
amitt10&italic typewriter type&m0--m2&
amcc10&caps \& small caps&m0--m2\cr
amst10&slanted typewriter type&m0--m2&
amex10&math extension&m0--m5\cr
ambl10&bold extended slanted&m0--m2&
amdh10&Dunhill&m0--m2\cr
amu10&unslanted text italic&m0--m2&
amb10&bold&m0--m2\cr
amby10&bold math symbols&m0--m2&
ambi10&bold math italic&m0--m2\cr
}}$$
\bye
\centerline {\bf Appendix}
%\input manmac.tex[tex,dek]
\def\sep{\medskip\hrule width\hsize\medskip}
\def \dsep{\vskip-5pt\line{\dotfill}\smallskip}
%\medskip\smallskip
%\hrule height .61803pt
%\kern 1pt
%\hrule
%medskip
\vfill
\line{\strut Characters that are reserved for special purposes:\hfil
\\ \hfil $\{$ \hfil $\}$ \hfil \$ \hfil \& \hfil \# \hfil \% \hfil \↑ \hfil \_{} \hfil \~{} }
\sep
\vbox{\halign {\hfil #\hfil\hskip7.5pt &&\hfil #\hfil\hskip7.5pt \cr
To print&-&--&---&$-$&``text''&?`&!`&\$&\#&\&&\%&\ae&\AE&\oe&\OE&\`a\cr
You type&\tt -&\tt -{}-&\tt -{}-{}-{}&$\$${\tt -}$\$$&\tt `{}`text'{}'&
\tt ?{}`&\tt !{}`&\tt \\\$&\tt \\\#&\tt \\\&&\tt \\\%&
\tt \\ae&\tt \\AE&\tt \\oe&\tt \\OE&\tt \\aa\cr
}}
\dsep
\vbox{\halign {\hfil #\hfil\hskip7.8pt &&\hfil #\hfil\hskip7.8pt \cr
\AA&\ss&\o&\O&
\`a&\'e&\↑o&\"u&\=y&\~n&\.p&\u\i&\v s&\H\j&\t\i u&\b k\cr
\tt \\AA&\tt \\ss&\tt \\o&\tt \\O&
\tt \\\`{}a&\tt \\\'{}e&\tt \\\↑{}o&\tt \\\"{}u&\tt \\\={}y&\tt \\\~{}n&
\tt \\.p&\tt \\\u\\\i&\tt \\\v{}s&\tt \\H\\j&\tt \\t\\i u&\tt \\b k\cr
}}
\dsep
\vbox{\halign {\hfil #\hfil\hskip7.2pt &&\hfil #\hfil\hskip7.2pt \cr
\c c&\d h&\l&\L&\dag&\ddag&\S&\P&
\rlap/c&\it \$&\it \& &\copyright&\dots\cr
\tt \\c c&\tt \\d h&\tt \\l&\tt \\L&\tt \\dag&\tt \\ddag&\tt \\S&\tt \\P&
\tt \\rlap/c&\tt \\it\\\$ &\tt \\it\\\&&\tt \\copyright&\tt \\dots\cr}}
\sep
\def\]{\leavevmode\hbox{\tt\char`\ }} % visible space
\line{\strut Line break controls:\hfil
\tt \\break\hfil\\allowbreak\hfil\\nobreak\hfil\\hbox$\{$unbreakable$\}$}
\line{\strut \tt dis\\-cre\\-tion\\-ary hy\\-phens \hfil
{\rm virgule\slash breakpoint:}\ \ \\slash}
\dsep
\settabs 2\columns
\+\strut Breakable horizontal spaces:& Unbreakable horizontal spaces:\cr
\+{\tt \\\]} \ normal interword space& {\tt \~{}} \ normal interword space\cr
\+{\tt \\enskip} \ this\enskip much& {\tt \\enspace} \ this\enspace much\cr
\+{\tt \\quad} \ this\quad much& {\tt \\thinspace} \ this\thinspace much\cr
\+{\tt \\qquad} \ this\qquad much& {\tt \\negthinspace} \ this\negthinspace much\cr
\+\strut{\tt \\hskip \ <arbitrary dimen>}& {\tt \\kern \ <arbitrary dimen>}\cr
\sep
\+\strut Vertical spaces:\hfill
{\tt \\smallskip} $\vcenter{\hrule width2em\smallskip\hrule}$\hfill&
\\medskip $\vcenter{\hrule width3em\medskip\hrule}$\hfill
\\bigskip $\vcenter{\hrule width4em\bigskip\hrule}$&\cr
\dsep
\line{Page break controls:\hfill {\tt \\eject \hfill\\supereject\hfill
\\nobreak\hfill\\goodbreak\hfill\\filbreak}}
\+\strut Vertical spaces and good breakpoints:&
{\tt \\smallbreak\hfill\\medbreak\hfill\\bigbreak}&\cr
\line{\downbracefill}
\line{~\\line$\{$\\downbracefill$\}$\quad
\\hrulefill \hrulefill\quad\\dotfill \dotfill\quad
\\line$\{$\\upbracefill$\}$~}
\vskip-5pt
\line{\upbracefill}\smallskip
\medskip
\line{\hfill{\tt \\rm} {\rm Roman}\hfill
{\tt \\sl} {\sl Slant}\hfill
{\tt \\it} {\it Italic\/}\hfill
{\tt \\tt} {\tt Typewriter}\hfill
{\tt \\bf} {\bf Boldface}\hfill}
%\smallskip
Typical font table ({\tt \\rm} for amr10). If necessary, one can type
{\tt \\char'100} to get \char'100.
\medskip
\vbox{\rm \halign{\hfil#\hfil\kern3.7pt&&\hfil#\hfil\kern3.7pt\cr
\char'000&\char'001&\char'002&\char'003&\char'004&\char'005&\char'006&\char'007&&&
\char'010&\char'011&\char'012&\char'013&\char'014&\char'015&\char'016&\char'017&&&
\char'020&\char'021&\char'022&\char'023&\char'024&\char'025&\char'026&\char'027&&&
\char'030&\char'031&\char'032&\char'033&\char'034&\char'035&\char'036&\char'037\cr
\char'040&\char'041&\char'042&\char'043&\char'044&\char'045&\char'046&\char'047&&&
\char'050&\char'051&\char'052&\char'053&\char'054&\char'055&\char'056&\char'057&&&
\char'060&\char'061&\char'062&\char'063&\char'064&\char'065&\char'066&\char'067&&&
\char'070&\char'071&\char'072&\char'073&\char'074&\char'075&\char'076&\char'077\cr
\char'100&\char'101&\char'102&\char'103&\char'104&\char'105&\char'106&\char'107&&&
\char'110&\char'111&\char'112&\char'113&\char'114&\char'115&\char'116&\char'117&&&
\char'120&\char'121&\char'122&\char'123&\char'124&\char'125&\char'126&\char'127&&&
\char'130&\char'131&\char'132&\char'133&\char'134&\char'135&\char'136&\char'137\cr
\char'140&\char'141&\char'142&\char'143&\char'144&\char'145&\char'146&\char'147&&&
\char'150&\char'151&\char'152&\char'153&\char'154&\char'155&\char'156&\char'157&&&
\char'160&\char'161&\char'162&\char'163&\char'164&\char'165&\char'166&\char'167&&&
\char'170&\char'171&\char'172&\char'173&\char'174&\char'175&\char'176&\char'177\cr}}
Greek Letters, in Math mode ({\tt \$\\gamma\$}, or {\tt \$\\Gamma\$} for upper case where shown)
\smallskip
\vbox{\halign{\hfil#\hfil\quad&\hfil#\hfil\quad&\tt #\hfil\qquad\qquad&
\hfil#\hfil\quad&\hfil#\hfil\quad&\tt #\hfil\qquad\qquad&
\hfil#\hfil\quad&\hfil#\hfil\quad&\tt #\hfil\cr
&$\alpha$&\\alpha&&$\iota$&\\iota&&$\varrho$&\\varrho\cr
&$\beta$&\\beta&&$\kappa$&\\kappa&$\Sigma$&$\sigma$&\\sigma\cr
$\Gamma$&$\gamma$&\\gamma&$\Lambda$&$\lambda$&\\lambda&&$\varsigma$&\\varsigma\cr
$\Delta$&$\delta$&\\delta&&$\mu$&\\mu&&$\tau$&\\tau\cr
&$\epsilon$&\\epsilon&&$\nu$&\\nu&$\Upsilon$&$\upsilon$&\\upsilon\cr
&$\varepsilon$&\\varepsilon&$\Xi$&$\xi$&\\xi&$\Phi$&$\phi$&\\phi\cr
&$\zeta$&\\zeta&$O$&$o$&o&&$\varphi$&\\varphi\cr
&$\eta$&\\eta&$\Pi$&$\pi$&\\pi&&$\chi$&\\chi\cr
$\Theta$&$\theta$&\\theta&&$\varpi$&\\varpi&$\Psi$&$\psi$&\\psi\cr
&$\vartheta$&\\vartheta&&$\rho$&\\rho&$\Omega$&$\omega$&\\omega\cr
}}
\eject
\null\vskip-30pt
%\vsize=9.2 truein
Miscellaneous special symbols, available in Math mode
\smallskip
\halign{\hfil#\hfil\quad&\tt #\hfil\qquad\qquad&
\hfil#\hfil\quad&\tt #\hfil\qquad\qquad&
\hfil#\hfil\quad&\tt #\hfil\cr
$\aleph$&{\tt \\aleph}&$\prime$&{\tt \\prime}&$\forall$&{\tt \\forall}\cr
$\hbar$&{\tt \\hbar}&$\emptyset$&{\tt \\emptyset}&$\exists$&{\tt \\exists}\cr
$\imath$&{\tt \\imath}&$\nabla$&{\tt \\nabla}&$\neg$&{\tt \\neg}\cr
$\jmath$&{\tt \\jmath}&$\surd$&{\tt \\surd}&$\flat$&{\tt \\flat}\cr
$\ell$&{\tt \\ell}&$\top$&{\tt \\top}&$\natural$&{\tt \\natural}\cr
$\wp$&{\tt \\wp}&$\bot$&{\tt \\bot}&$\sharp$&{\tt \\sharp}\cr
$\Re$&{\tt \\Re}&$\Vert$&{\tt \\Vert}&$\clubsuit$&{\tt \\clubsuit}\cr
$\Im$&{\tt \\Im}&$\angle$&{\tt \\angle}&$\diamondsuit$&{\tt \\diamondsuit}\cr
$\partial$&{\tt \\partial}&$\triangle$&{\tt \\triangle}&$\heartsuit$&{\tt \\heartsuit}\cr
$\infty$&{\tt \\infty}&$\backslash$&{\tt \\backslash}&$\spadesuit$&{\tt \\spadesuit}\cr}
Binary operators (in addition to $+$ and $-$) available in Math mode
\smallskip
\halign{\hfil#\hfil\quad&\tt #\hfil\qquad\qquad&
\hfil#\hfil\quad&\tt #\hfil\qquad\qquad&
\hfil#\hfil\quad&\tt #\hfil\cr
$\pm$&{\tt \\pm}&$\cap$&{\tt \\cap}&$\vee$&{\tt \\vee}\cr
$\mp$&{\tt \\mp}&$\cup$&{\tt \\cup}&$\wedge$&{\tt \\wedge}\cr
$\setminus$&{\tt \\setminus}&$\uplus$&{\tt \\uplus}&$\oplus$&{\tt \\oplus}\cr
$\cdot$&{\tt \\cdot}&$\sqcap$&{\tt \\sqcap}&$\ominus$&{\tt \\ominus}\cr
$\times$&{\tt \\times}&$\sqcup$&{\tt \\sqcup}&$\otimes$&{\tt \\otimes}\cr
$\ast$&{\tt \\ast}&$\triangleleft$&{\tt \\triangleleft}&$\oslash$&{\tt \\oslash}\cr
$\star$&{\tt \\star}&$\triangleright$&{\tt \\triangleright}&$\odot$&{\tt \\odot}\cr
$\diamond$&{\tt \\diamond}&$\wr$&{\tt \\wr}&$\dagger$&{\tt \\dagger}\cr
$\circ$&{\tt \\circ}&$\bigcirc$&{\tt \\bigcirc}&$\ddagger$&{\tt \\ddagger}\cr
$\bullet$&{\tt \\bullet}&$\bigtriangleup$&{\tt \\bigtriangleup}&$\amalg$&{\tt \\amalg}\cr
$\div$&{\tt \\div}&$\bigtriangledown$&{\tt \\bigtriangledown}\cr}
Relations (in addition to $<$, $>$, and $=$), available in Math mode
\smallskip
\halign{\hfil#\hfil\quad&\tt #\hfil\qquad\qquad&
\hfil#\hfil\quad&\tt #\hfil\qquad\qquad&
\hfil#\hfil\quad&\tt #\hfil\cr
$\leq$&{\tt \\leq}&$\geq$&{\tt \\geq}&$\equiv$&{\tt \\equiv}\cr
$\prec$&{\tt \\prec}&$\succ$&{\tt \\succ}&$\sim$&{\tt \\sim}\cr
$\preceq$&{\tt \\preceq}&$\succeq$&{\tt \\succeq}&$\simeq$&{\tt \\simeq}\cr
$\ll$&{\tt \\ll}&$\gg$&{\tt \\gg}&$\asymp$&{\tt \\asymp}\cr
$\subset$&{\tt \\subset}&$\supset$&{\tt \\supset}&$\approx$&{\tt \\approx}\cr
$\subseteq$&{\tt \\subseteq}&$\supseteq$&{\tt \\supseteq}&$\cong$&{\tt \\cong}\cr
$\sqsubseteq$&{\tt \\sqsubseteq}&$\sqsupseteq$&{\tt \\sqsupseteq}&$\bowtie$&{\tt \\bowtie}\cr
$\in$&{\tt \\in}&$\ni$&{\tt \\ni}&$\propto$&{\tt \\propto}\cr
$\vdash$&{\tt \\vdash}&$\dashv$&{\tt \\dashv}&$\models$&{\tt \\models}\cr
$\smile$&{\tt \\smile}&$\mid$&{\tt \\mid}&$\doteq$&{\tt \\doteq}\cr
$\frown$&{\tt \\frown}&$\parallel$&{\tt \\parallel}&$\perp$&{\tt \\perp}\cr
\noalign{\vskip-10pt}
\noalign{Negated relations (the \\not symbol is considered to have zero width)}
$\not<$&{\tt \\not<}&$\not>$&{\tt \\not>}&$\not=$&{\tt \\not=}\cr
$\not\leq$&{\tt \\not\\leq}&$\not\geq$&{\tt \\not\\geq}&
$\not\equiv$&{\tt \\not\\equiv}\cr
$\not\prec$&{\tt \\not\\prec}&$\not\succ$&{\tt \\not\\succ}&
$\not\sim$&{\tt \\not\\sim}\cr
$\not\preceq$&{\tt \\not\\preceq}&$\not\succeq$&{\tt \\not\\succeq}&
$\not\simeq$&{\tt \\not\\simeq}\cr
$\not\subset$&{\tt \\not\\subset}&$\not\supset$&{\tt \\not\\supset}&
$\not\approx$&{\tt \\not\\approx}\cr
$\not\subseteq$&{\tt \\not\\subseteq}&$\not\supseteq$&{\tt \\not\\supseteq}&
$\not\cong$&{\tt \\not\\cong}\cr
$\not\sqsubseteq$&{\tt \\not\\sqsubseteq}&$\not\sqsupseteq$&{\tt \\not\\sqsupseteq}&
$\not\asymp$&{\tt \\not\\asymp}\cr
}
\eject
Arrows for use in Math mode
\smallskip
\halign{\hfil#\hfil\quad&\tt #\hfil\quad&
\hfil#\hfil\quad&\tt #\hfil\qquad&
\hfil#\hfil\quad&\tt #\hfil\cr
$\leftarrow$&{\tt \\leftarrow}&$\longleftarrow$&{\tt \\longleftarrow}&
$\uparrow$&{\tt \\uparrow}\cr
$\Leftarrow$&{\tt \\Leftarrow}&$\Longleftarrow$&{\tt \\Longleftarrow}&
$\Uparrow$&{\tt \\Uparrow}\cr
$\rightarrow$&{\tt \\rightarrow}&$\longrightarrow$&{\tt \\longrightarrow}&
$\downarrow$&{\tt \\downarrow}\cr
$\Rightarrow$&{\tt \\Rightarrow}&$\Longrightarrow$&{\tt \\Longrightarrow}&
$\Downarrow$&{\tt \\Downarrow}\cr
$\leftrightarrow$&{\tt \\leftrightarrow}&$\longleftrightarrow$&{\tt \\longleftrightarrow}&
$\updownarrow$&{\tt \\updownarrow}\cr
$\Leftrightarrow$&{\tt \\Leftrightarrow}&$\Longleftrightarrow$&{\tt \\Longleftrightarrow}&
$\Updownarrow$&{\tt \\Updownarrow}\cr
$\mapsto$&{\tt \\mapsto}&$\longmapsto$&{\tt \\longmapsto}&
$\nearrow$&{\tt \\nearrow}\cr
$\searrow$&{\tt \\searrow}&$\swarrow$&{\tt \\swarrow}&$\nwarrow$&{\tt \\nwarrow}\cr
$\hookleftarrow$&{\tt \\hookleftarrow}&$\hookrightarrow$&{\tt \\hookrightarrow}\cr}
%$\lefttophalfarrow$&{\tt \\lefttophalfarrow}&$\righttophalfarrow$&{\tt \\righttophalfarrow}&
%$\leftbothalfarrow$&{\tt \\leftbothalfarrow}&$\rightbothalfarrow$&{\tt \\rightbothalfarrow}&
%$\rightlefthalfarrows$&{\tt \\rightlefthalfarrows}\cr}
%smallskip
Some alternate names used in Math mode
\smallskip
\halign{\hfil#\hfil\quad\hfil\qquad\qquad&&
\hfil#\hfil\quad\hfil\qquad\qquad\cr
$\ne$&{\tt \\ne}&$\{$&{\tt \\$\{$}&$\gets$&{\tt \\gets}&$\lor$&{\tt \\lor}&$\Vert$&{\tt \\Vert}\cr
$\le$&{\tt \\le}&$\}$&{\tt \\$\}$}&$\owns$&{\tt \\owns}&$\lnot$&{\tt \\lnot}\cr
$\ge$&{\tt \\ge}&$\to$&{\tt \\to}&$\land$&{\tt \\land}&$\vert$&{\tt \\vert}\cr
}
%smallskip
Large operators as used in Math (\$\dots\$) and in Math Display (\$\$ \dots\$\$) modes
\smallskip
{\displayindent=16pt \openup3pt
\halign{&\qquad\hbox to10pt{\hss$#$\hss}\quad&
\hbox to10pt{\hss$\displaystyle#$\hss}\quad&
\hbox to65pt{#\hss}\cr
\sum&\sum&{\tt \\sum}&\bigcap&\bigcap&{\tt \\bigcap}&
\bigodot&\bigodot&{\tt \\bigodot}\cr
\prod&\prod&{\tt \\prod}&\bigcup&\bigcup&{\tt \\bigcup}&
\bigotimes&\bigotimes&{\tt \\bigotimes}\cr
\coprod&\coprod&{\tt \\coprod}&\bigsqcup&\bigsqcup&{\tt \\bigsqcup}&
\bigoplus&\bigoplus&{\tt \\bigoplus}\cr
\int&\int&{\tt \\int}&\bigvee&\bigvee&{\tt \\bigvee}&
\biguplus&\biguplus&{\tt \\biguplus}\cr
\oint&\oint&{\tt \\oint}&\bigwedge&\bigwedge&{\tt \\bigwedge}\cr
}}
%\smallskip
Extendable delimiters, in addition to ( \ ) \ $\{$ \ $\}$ \ [ \ and ], used in Display Math mode
\smallskip
{\halign{\hfil$#$\hfil\quad&\tt #\hfil\qquad\quad&
\hfil$#$\hfil\quad&\tt #\hfil\qquad&
\hfil$#$\hfil\quad&\tt #\hfil\qquad\quad&
\hfil$#$\hfil\quad&\tt #\hfil\cr
\lfloor&\\lfloor& \langle&\\langle& \vert&\\vert& \downarrow&\\downarrow\cr
\rfloor&\\rfloor& \rangle&\\rangle& \Vert&\\Vert& \Downarrow&\\Downarrow\cr
\lceil&\\lceil& /&/& \uparrow&\\uparrow& \updownarrow&\\updownarrow\cr
\rceil&\\rceil& \\&\\backslash& \Uparrow&\\Uparrow& \Updownarrow&\\Updownarrow\cr
}}
%\smallskip
Function names that print in roman type, for use when in Math mode
\smallskip
{\tt \halign{#\hfil\quad&\hfil\quad\cr
\\arccos &\\cos &\\csc &\\exp &\\ker &\\limsup &\\min &\\sinh\cr
\\arcsin &\\cosh &\\deg &\\gcd &\\lg &\\ln &\\Pr &\\sup\cr
\\arctan &\\cot &\\det &\\hom &\\lim &\\log &\\sec &\\tan\cr
\\arg &\\coth &\\dim &\\inf &\\liminf &\\max &\\sin &\\tanh\cr
}}
%\smallskip
Dimensions, preset by {\tt PLAIN.TEX}, that you may want to change
\smallskip
\halign{#\hfil\qquad&\hfil\qquad\cr
\\hsize=6.5in&
\\parindent=20pt&
\\abovedisplayskip=12pt plus 3pt minus 9pt\cr
\\vsize=8.9in&
\\parskip=0pt plus 1pt&
\\belowdisplayskip=12pt plus 3pt minus 9pt\cr}
\eject
\centerline{Macros for setting ordinary text}
\vskip-20pt
$$\vbox{\halign{#\hfil\quad&\hfil\quad\cr
\\frenchspacing&\\break&\\bigbreak&\\hidewidth&\\ttraggedright\cr
\\nonfrenchspacing&\\nobreak&\\line&\\multispan\#1&\\leavevmode\cr
\\normalbaselines&\\allowbreak&\\leftline\#1&\\cleartabs&\\hrulefill\cr
\\null&\\filbreak&\\rightline\#1&\\hang&\\dotfill\cr
\\obeyspaces&\\goodbreak&\\centerline\#1&\\textindent\#1&\\downbracefill\cr
\\loop\#1\\repeat&\\eject&\\rlap\#1&\\item&\\upbracefill\cr
\\iterate&\\supereject&\\llap\#1&\\itemitem\cr
\\nointerlineskip&\\smallbreak&\\underbar\#1&\\narrower\cr
\\offinterlineskip&\\medbreak&\\strut&\\raggedright\cr}}$$
\centerline{Macros for setting math}
$$\vbox{\halign{#\hfil\qquad&\hfil\qquad\cr
\\joinrel&\\vphantom&\\openup&\\cases\#1&\\ldots\cr
\\relbar&\\hphantom&\\eqalign\#1&\\matrix\#1&\\cdots\cr
\\Relbar&\\phantom&\\displaylines\#1&\\pmatrix\#1&\\vdots\cr
\\bowtie&\\mathstrut&\\eqalignno\#1&\\bordermatrix\#1&\\ddots\cr
\\models&\\smash&\\leqalignno\#1\cr}}$$
\centerline{Parameters preset by {\tt PLAIN.TEX} that may be reset, with caution}
$$\vbox{\halign{#\hfil\qquad&\hfil\qquad\cr
\\vbadness=1000&\\tracinglostchars=1&\\delimitershortfall=5pt\cr
\\linepenalty=10&\\uchyph=1&\\nulldelimiterspace=1.2pt\cr
\\hyphenpenalty=50&\\newlinechar=-1&\\scriptspace=0.5pt\cr
\\exhyphenpenalty=50&\\delimiterfactor=901&\\parindent=20pt\cr
\\binoppenalty=700&\\showboxbreadth=5&\\parskip=0pt plus 1pt\cr
\\relpenalty=500&\\showboxdepth=3&\\topskip=10pt\cr
\\hbadness=1000&\\adjdemerits=10000&\\maxdepth=4pt\cr
\\clubpenalty=150&\\hfuzz=0.1pt&\\thinmuskip=3mu\cr
\\widowpenalty=150&\\vfuzz=0.1pt&\\normalbaselineskip=12pt\cr
\\displaywidowpenalty=50&\\overfullrule=5pt&\\normallineskip=1pt\cr
\\brokenpenalty=100&\\hsize=6.5in&\\jot=3pt\cr
\\predisplaypenalty=10000&\\vsize=8.9in\cr}}$$
$$\vbox{\halign{#\hfil\quad&\hfil\quad\cr
\\doublehyphendemerits=10000&\\belowdisplayskip=12pt plus 3pt minus 9pt\cr
\\finalhyphendemerits=5000&\\belowdisplayshortskip=7pt plus 3pt minus 4pt\cr
\\parfillskip=0pt plus 1fil&\\smallskipamount=3pt plus 1pt minus 1pt\cr
\\medmuskip={\eightrm 4mu plus 2mu minus 4mu}&\\medskipamount=6pt plus 2pt minus 2pt\cr
\\thickmuskip=5mu plus 5mu&\\bigskipamount=12pt plus 4pt minus 4pt\cr
\\interdisplaylinepenalty=100&\\abovedisplayskip=12pt plus 3pt minus 9pt\cr
\\interfootnotelinepenalty=100&\\abovedisplayshortskip=0pt plus 3pt\cr}}$$
\centerline{Unassigned parameters, set to zero automatically}
$$\vbox{\halign{#\hfil\qquad&\hfil\qquad\cr
\\pausing&\\tracingparagraphs&\\tracingrestores&\\spaceskippt\cr
\\tracingonline&\\tracingpages&\\leftskippt&\\hoffsetpt\cr
\\tracingmacros&\\tracingoutput&\\rightskippt&\\voffsetpt\cr
\\tracingstats&\\tracingcommands&\\tabskippt\cr}}$$
\centerline{Fonts preloaded and named by{\tt PLAIN.TEX}}
$$\vbox{\halign{#\hfil \qquad\hfil\enskip\hfil\qquad&
#\hfil\enskip\hfil\qquad\hfil&\enskip#\hfil\cr
\rm roman text&\\tenrm&amr10&\\sevenrm&amr7&\\fiverm&amr5\cr
\teni math$\;$italic&\\teni&ammi10&\\seveni&ammi7&\\fivei&ammi5\cr
math symbols&\\tensy&amsy10&\\sevensy&amsy7&\\fivesy&amsy5\cr
math extension&\\tenex&amex10\cr
\bf boldface extended&\\tenbf&ambx10&\\sevenbf&ambx7&\\fivebf&ambx5\cr
\tt typewriter&\\tentt&amtt10\cr
\sl slanted roman&\\tensl&amsl10\cr
\it text italic&\\tenit&amti10\cr}}$$
\centerline{Fonts preloaded by {\tt PLAIN.TEX} but un-named}
$$\vbox{\halign{#\hfil\qquad\hfil\enskip\hfil\enskip\hfil\qquad\enskip&
#\hfil\qquad\hfil \enskip\hfil\cr
roman text&amr9&amr8&amr6&sans serif&amss10&amssq8\cr
math italic&ammi9&ammi8&ammi6&s.s.italic&amssi10&amssqi8\cr
math symbols&amsy9&amsy8&amsy6&slanted roman&amsl9&amsl8\cr
typewriter&amtt9&amtt8&&slanted typewr.&amsltt10 \cr
bold face&ambx9&ambx8&ambx6\cr
&amti9&amti8&amti7\cr}}$$
$$\vbox{\halign{#\hfil\quad\hfil\qquad\quad\hfil\quad\hfil\cr
unslanted text italic&amu10&Dunhill style&amdunh10\cr
bold math italic&ambi10&for titles&amr7 scaled \\magstep4\cr
bold math symbols&ambsy10&&amtt10 scaled \\magstep2\cr
caps and small caps&amcsc10&&amssbx10 scaled \\magstep2\cr
sans serif bold extended&amssbx10\cr}}$$
\medskip
\centerline{Some Almost-Computer-Modern Fonts distributed by Stanford}
\centerline{Magnif. m0--m5 means magnification by $1$, $\sqrt{1.2}$, $1.2$,
$(1.2)↑2$, $(1.2)↑3$, $(1.2)↑4$, and $(1.2)↑5$.}
$$\vbox{\halign{#\hfil\quad\hfil\qquad\quad&
#\hfil\quad\hfil\qquad\hfil\quad\hfil\qquad\hfil\quad\hfil\cr
Name&Font&pt&Magnif.&pt&Magnif.&pt&magnif.\cr
\noalign{\smallskip}
amr&roman&10&m0--m5&9&m0--m2&8&m0--m2\cr
&&7&m0--m5&6&m0--m2&5&m0--m5\cr
ambx&bold extended&10&m0--m5&9&m0--m2&8&m0--m2\cr
&&7&m0--m5&6&m0--m2&5&m0--m5\cr
amsy&math symbols&10&m0--m5&9&m0--m2&8&m0--m2\cr
&&7&m0--m5&6&m0--m2&5&m0--m5\cr
ami&math italic&10&m0--m5&9&m0--m2&8&m0--m2\cr
&&7&m0--m5&6&m0--m2&5&m0--m5\cr
amti&text italic&10&m0--m5&9&m0--m2&8&m0--m2\cr
&&7&m0--m2\cr
amsl&slanted roman&10&m0--m5&9&m0--m2&8&m0--m2\cr
amtt&typewriter type&10&m0--m5&9&m0--m2&8&m0--m2\cr}}$$\nobreak
$$\vbox{\halign{#\hfil\enskip\hfil\enskip\hfil\qquad\hfil\enskip\hfil\enskip\hfil\cr
amitt10&italic typewriter type&m0--m2&
amcc10&caps \& small caps&m0--m2\cr
amst10&slanted typewriter type&m0--m2&
amex10&math extension&m0--m5\cr
ambl10&bold extended slanted&m0--m2&
amdh10&Dunhill&m0--m2\cr
amu10&unslanted text italic&m0--m2&
amb10&bold&m0--m2\cr
amby10&bold math symbols&m0--m2&
ambi10&bold math italic&m0--m2\cr
}}$$
\bye
\beginchapter Appendix B. Basic\\Control\\Sequences
Let's begin this appendix with a chart that summarizes plain \TeX's
↑↑{summary of plain TeX} ↑↑|\+| ↑↑{tabbing} ↑↑{accents}
conventions.
\def\sep{\medskip\hrule width\hsize\medskip}
\medskip\smallskip
\hrule height .61803pt
\kern 1pt
\hrule
\medskip
\line{\strut Characters that are reserved for special purposes:\hfil
|\|\hfil|{|\hfil|}|\hfil|$|\hfil|&|\hfil|#|\hfil|%|\hfil|↑|\hfil|_|\hfil|~|}
\sep
\halign to\hsize{\strut\hfil#\hfil\tabskip\z@ plus10pt&
\hfil#\hfil&\hfil#\hfil&
\hfil#\hfil\tabskip\z@skip\cr
|\rm roman,|&|{\sl slanted},|&|{\bf boldface},|&|{\it italic\/} type|\cr
roman,&{\sl slanted},&{\bf boldface},&{\it italic\/} type\cr}
\sep
\halign to\hsize{\strut\hfil#\hfil\tabskip\z@ plus10pt&
\hfil#\hfil&\hfil#\hfil&\hfil#\hfil&\hfil#\hfil&\hfil#\hfil&
\hfil#\hfil&\hfil#\hfil&\hfil#\hfil&\hfil#\hfil&\hfil#\hfil&
\hfil#\hfil&\hfil#\hfil&\hfil#\hfil&\hfil#\hfil&\hfil#\hfil&
\hfil#\hfil&\hfil#\hfil&
\hfil#\hfil\tabskip\z@skip\cr
|``|&|''|&|--|&|---|&|?||`|&|!||`|&|\$|&|\#|&|\&|&|\%|&
|\ae|&|\AE|&|\oe|&|\OE|&|\aa|&|\AA|&|\ss|&|\o|&|\O|\cr
``&''&--&---&?`&!`&\$&\#&\&&\%&\ae&\AE&\oe&\OE&\aa&\AA&\ss&\o&\O\cr}
\sep
\halign to\hsize{\strut\hfil#\hfil\tabskip\z@ plus10pt&
\hfil#\hfil&\hfil#\hfil&\hfil#\hfil&\hfil#\hfil&\hfil#\hfil&
\hfil#\hfil&\hfil#\hfil&\hfil#\hfil&\hfil#\hfil&\hfil#\hfil&
\hfil#\hfil&\hfil#\hfil&
\hfil#\hfil\tabskip\z@skip\cr
|\`a|&|\'e|&|\↑o|&|\"u|&|\=y|&|\~n|&|\.p|&|\u\i|&
|\v s|&|\H\j|&|\t\i u|&|\b k|&|\c c|&|\d h|\cr
\`a&\'e&\↑o&\"u&\=y&\~n&\.p&\u\i&\v s&\H\j&\t\i u&\b k&\c c&\d h\cr}
\sep
\halign to\hsize{\strut\hfil#\hfil\tabskip\z@ plus10pt&
\hfil#\hfil&\hfil#\hfil&\hfil#\hfil&\hfil#\hfil&\hfil#\hfil&
\hfil#\hfil&\hfil#\hfil&\hfil#\hfil&\hfil#\hfil&
\hfil#\hfil\tabskip\z@skip\cr
|\l|&|\L|&|\dag|&|\ddag|&|\S|&|\P|&|{\it\$|&
|\&}|&|\copyright|&|\TeX|&|\dots|\cr
\l&\L&\dag&\ddag&\S&\P&\phantom{\tt////}\it\$&
\it\&\phantom{\tt/}&\copyright&\TeX&\dots\cr}
\sep
\line{\strut Line break controls:\hfil
|\break|\hfil|\nobreak|\hfil|\allowbreak|\hfil|\hbox{unbreakable}|}
\line{\strut|dis\-cre\-tion\-ary hy\-phens|\hfil|virgule\slash breakpoint|}
\sep
\settabs 2\columns
\+\strut Breakable horizontal spaces:& Unbreakable horizontal spaces:\cr
\+|\|\] \ normal interword space& |~| \ normal interword space\cr
\+|\enskip| \ this\enskip much& |\enspace | \ this\enspace much\cr
\+|\quad | \ this\quad much& |\thinspace | \ this\thinspace much\cr
\+|\qquad | \ this\qquad much& |\negthinspace| \ this\negthinspace much\cr
\+\strut|\hskip| \<arbitrary dimen>& |\kern| \<arbitrary dimen>\cr
\sep
\smallskip
\+\strut Vertical spaces:\hfill
|\smallskip| $\vcenter{\hrule width2em\smallskip\hrule}$\hfill&
|\medskip| $\vcenter{\hrule width3em\medskip\hrule}$\hfill
|\bigskip| $\vcenter{\hrule width4em\bigskip\hrule}$&\cr
\smallskip
\sep
\line{\strut Page break controls:\hfil|\eject|\hfil|\supereject|\hfil
|\nobreak|\hfil|\goodbreak|\hfil|\filbreak|}
\+\strut Vertical spaces and good breakpoints:&
|\smallbreak|\hfill|\medbreak|\hfill|\bigbreak|&\cr
\sep
\settabs 4 \columns
\hbox{\strut|\settabs 4 \columns|}
\hbox{|\+Here's an example&of\hfill some &tabbing:&\hrulefill&\cr|}
\+Here's an example&of\hfill some &tabbing:&\hrulefill&\cr
\+\hfill|\hrulefill |&\hrulefill&\hfill|\dotfill |&\dotfill&\cr
\+\hfill|\leftarrowfill |&\leftarrowfill&
\hfill|\rightarrowfill |&\rightarrowfill&\cr
\+\hfill|\upbracefill |&\upbracefill&
\hfill|\downbracefill |&\downbracefill&\cr
\smallskip
\line{\strut More general alignments use |\halign|, |\valign|, |\omit|,
|\span|, and |\multispan|.}
\sep
\line{\strut Examples of the principal conventions for text layout
appear on the next page.}
\sep\unskip
\kern 1pt
\hrule height .61803pt
\eject
\begingroup\parindent\z@ \obeylines \baselineskip12pt plus 1pt
|% This test file generates the output shown on the opposite page.|
|% It's a bit complex because it tries to illustrate lots of stuff.|
|% TeX ignores commentary (like this) that follows a `%' sign.|
| |
|% First the standard output style is changed slightly:|
↑|\hsize||=29pc % The lines in this book are 29 picas wide.|
↑|\vsize||=42pc % The page body is 42 picas (not counting footlines).|
↑|\footline||={\tenrm Footline\quad\dotfill\quad Page \folio}|
↑|\pageno||=1009 % This is the starting page number (don't ask why).|
|% See Chapter 23 for the way to make other page format changes via|
|% \hoffset, \voffset, \nopagenumbers, \headline, or \raggedbottom.|
| |
↑|\vglue|| 1in % This makes an inch of blank space (1in=2.54cm).|
↑|\centerline||{\bf A Bold, Centered Title}|
↑|\smallskip|| % This puts a little extra space after the title line.|
↑|\rightline||{\it avec un sous-titre \`a la fran\c caise}|
|% Now we use \beginsection to introduce part 1 of the document.|
↑|\beginsection|| 1. Plain \TeX nology % The next line must be blank!|
| |↑↑{blank line}
|The first paragraph of a new section is not indented.|
↑|\TeX||\ recognizes the end of a paragraph when it comes to a blank|
|line in your manuscript file. % or to a `\par': see below.|↑↑|\par|
| |↑↑|\footnote|↑↑|\tt|↑↑|\char|
|Subsequent paragraphs {\it are\/} indented.\footnote*{The amount|
| of indentation can be changed by changing a parameter called|
|{\tt\char`\\parindent}. Turn the page for a summary of \TeX's most|
|important parameters.} (See?) The computer breaks a paragraph's|
|text into lines in an interesting way---see reference~[1]---and h%|
| yphenates words automatically when necessary.|↑↑{percent}
| |
↑|\midinsert|| % This begins inserted material, e.g., a figure.|
|\narrower\narrower % This brings the margins in (see Chapter 14).|
↑|\noindent|| |↑|\llap||{``}If there hadn't been room for this material on|
|the present page, it would have been inserted on the next one.''|
|\endinsert % This ends the insertion and the effect of \narrower.|
| |
↑|\proclaim|| Theorem T. The typesetting of $math$ is discussed in|
|Chapters 16--19, and math symbols are summarized in Appendix~F.|
| |
|\beginsection 2. Bibliography\par % `\par' acts like a blank line.|
↑|\frenchspacing|| % (Chapter 12 recommends this for bibliographies.)|
↑|\item||{[1]} D.~E. Knuth and M.~F. Plass, ``Breaking paragraphs|↑↑{Plass}
|into lines,'' {\sl Softw. pract. exp. \bf11} (1981), 1119--1184.|↑↑{Knuth}
↑|\bye|| % This is the way the file ends, not with a \bang but a \bye.|
\eject\endgroup
{\parindent 20pt
\vglue 1in % This makes an inch of blank space (1in=2.54cm).
\centerline{\bf A Bold, Centered Title}
\smallskip % This puts a little extra space between lines here.
\rightline{\it avec un sous-titre \`a la fran\c caise}
% Now we use \beginsection to introduce part 1 of the document.
\beginsection 1. Plain \TeX nology % The next line must be blank!
The first paragraph of a new section is not indented.
\TeX\ recognizes the end of a paragraph when it comes to a blank
line in your manuscript file. % or to a `\par': see below.
Subsequent paragraphs {\it are\/} indented.*{\spacefactor=3000}
(See?) The computer breaks a paragraph's
text into lines in an interesting way---see reference~[1]---and h%
yphenates words automatically when necessary.
\midinsert % This begins inserted material, e.g., a figure.
\narrower\narrower % This brings the margins in (see Chapter 14).
\noindent \llap{``}If there hadn't been room for this material on
the present page, it would have been inserted on the next one.''
\endinsert % This ends the insertion and the effect of \narrower.
\proclaim Theorem T. The typesetting of $math$ is discussed in
Chapters 16--19, and math symbols are summarized in Appendix~F.
\beginsection 2. Bibliography\par% `\par' is just like blank line.
\frenchspacing % (Chapter 12 recommends this for bibliographies.)
\item{[1]} D.~E. Knuth and M.~F. Plass, ``Breaking paragraphs
into lines,'' {\sl Softw. pract. exp. \bf11} (1981), 1119--1184.
\vfill
\hrule width 2in \kern 2.6pt
\textindent{*}\strut
The amount of indentation can be changed by changing a parameter called
{\tt\char`\\parindent}. Turn the page for a summary of \TeX's most
important parameters.\par
\baselineskip 24pt
\line{Footline\quad\dotfill\quad Page 1009}
\eject}
The preceding example illustrates most of the basic things
that you can do directly with plain \TeX, but it does not provide an
exhaustive list. Thus, it uses |\centerline| and |\rightline|,
but not |\leftline| or |\line|; it uses |\midinsert|, but not
|\topinsert| or |\pageinsert|; it uses |\smallskip|, but not
|\medskip| or |\bigskip|; it uses |\llap| but not |\rlap|, |\item|
but not |\itemitem|, |\vglue| but not |\hglue|. It does not
illustrate |\raggedright| setting of paragraphs; it does not use
↑|\obeylines| or ↑|\obeyspaces| to shut off \TeX's automatic
formatting. ↑↑{as is, see obeylines, obeyspaces}
All such control sequences are explained later in this appendix, and
further information can be found by looking them up in the index.
The main purpose of the example is to serve as a reminder of the
repertoire of possibilities.
Most of the control sequences used in the example are defined by
macros of plain \TeX\ format, but three of them are ↑{primitive}, i.e.,
built~in: `|\par|' (end of paragraph), `|\noindent|' (beginning of
non-indented paragraph), and `|\/|' (italic correction). The example
also assigns values to two of \TeX's primitive parameters, namely
|\hsize| and |\vsize|. \TeX\ has scores of parameters, all of which
are listed in Chapter~24, but only a few of them are of special
concern to the majority of \TeX\ users. Here are examples of how
you might want to give new values to the most important ↑{parameters}
other than |\hsize| and |\vsize|:
\par\begingroup\nobreak\medskip\parindent\z@ \obeylines
↑|\tolerance||=500|\quad(\TeX\ will tolerate lines whose badness is %
rated 500 or less.)
↑|\looseness||=1|\quad(The next paragraph will be one line longer than %
usual.)
↑|\parindent||=4mm|\quad(Paragraphs will be indented by four millimeters.)
↑|\hoffset||=1.5in|\quad(All output will be shifted right by one and a %
half inches.)
↑|\voffset||=24pt|\quad(All output will be shifted down by 24 points.)
↑|\baselineskip||=11pt plus.1pt|\quad(Baselines will be $11\pt$ apart, %
or a bit more.)
↑|\parskip||=3pt plus1pt minus.5pt|\quad(Extra space will %
precede each paragraph.)
\endgroup\medbreak\noindent
Plain \TeX\ uses |\parindent| also to control the amount of
indentation provided by ↑|\item|, ↑|\itemitem|, and ↑|\narrower|.
\danger The remainder of this appendix is devoted to the details of the
plain \TeX\ format, which is a set of macros that come with normal
implementations of \TeX. These macros serve three basic purposes:
\ (1)~They make \TeX\ usable, because \TeX's primitive capabilities
operate at a very low level. A~``virgin'' \TeX\ system that has no
macros is like a newborn baby that has an immense amount to learn about
the real world; but it is capable of learning fast. \ (2)~The plain
\TeX\ macros provide a basis for more elaborate and powerful formats
tailored to individual tastes and applications. You can do a lot with
plain \TeX, but pretty soon you'll want to do even more. \ (3)~The macros
also serve to illustrate how additional formats can be designed.
\ninepoint
Somewhere in your computer system you should be able to find a file
called ↑|plain.tex| that contains exactly what has been preloaded into
the running \TeX\ system that you use. Our purpose in the rest of this
appendix will be to discuss the contents of |plain.tex|. However, we
will not include a verbatim description, because some parts of that file
are too boring, and because the actual macros have been ``↑{optimized}''
↑↑{efficiency}
with respect to memory space and running time. Unoptimized versions of the
macros are easier for humans to understand, so we shall deal with those;
|plain.tex| contains equivalent constructions that work better on a machine.
So here's the plan for the rest of Appendix~B\null: We shall go through
the contents of |plain.tex|, interspersing an edited transcription of
that file with comments about noteworthy details. When we come to
macros whose usage has not yet been explained---for example, somehow
|\vglue| and |\beginsection| never made it into Chapters 1 through~27---we
shall consider them from a user's viewpoint; but most of the time we shall
be addressing the issues from the standpoint of a macro designer.
\subsection The code tables. A format's first duty is to establish
↑|\catcode| values. This is necessary because, for example, a |\def|
command can't be used until there are characters like |{| and~|}| of
categories 1 and~2. The ↑|INITEX| program (which reads |plain.tex|
so that \TeX\ can be initialized) begins without knowing any grouping
characters; hence |plain.tex| starts out as follows:
\beginlines
|% This is the plain TeX format that's described in The TeXbook.|
|% N.B.: A version number is defined at the very end of this file;|
|% please change that number whenever the file is modified!|
|% And don't modify the file under any circumstances.|
\smallbreak
|\catcode`\{=1 % left brace is begin-group character|
|\catcode`\}=2 % right brace is end-group character|
|\catcode`\$=3 % dollar sign is math shift|
|\catcode`\&=4 % ampersand is alignment tab|
|\catcode`\#=6 % hash mark is macro parameter character|
|\catcode`\↑=7 \catcode`\↑↑K=7 % circumflex and uparrow for superscripts|
|\catcode`\_=8 \catcode`\↑↑A=8 % underline and downarrow for subscripts|
|\catcode`\↑↑I=10 % ASCII tab is treated as a blank space|
|\chardef\active=13 \catcode`\~=\active % tilde is active|
|\catcode`\↑↑L=\active \outer\def↑↑L{\par} % ASCII form-feed is \outer\par|
\smallskip
|\message{Preloading the plain format: codes,}|
\endlines
These instructions set up the nonstandard characters
|↑↑K| and |↑↑A| for ↑{superscripts} and ↑{subscripts}, in addition to~|↑|
and~|_|, so that people with extended character sets can use
{\tentex\char'13} and {\tentex\char1} as recommended in Appendix~C\null.
↑↑{uparrow char} ↑↑{downarrow char}
Furthermore |↑↑I| (↑{ASCII} ↑\<tab>) is given category~10 (space);
and |↑↑L| (ASCII
\<formfeed>) becomes an active character that will detect runaways on
files that have been divided into ``↑{file pages}'' by ↑\<formfeed>
characters. The control sequence ↑|\active| is defined to yield the
constant~13; this is the one category code that seems to deserve a
symbolic name, in view of its frequent use in constructing
special-purpose macros.
When |INITEX| begins, category 12 (other) has been assigned to all~128
possible characters, except that the 52~letters |A...Z| and |a...z| are
category~11 (letter), and a few other assignments equivalent to the
following have been made:
\begintt
\catcode `\\ =0 \catcode`\ =10 \catcode `\% =14
\catcode`\↑↑@=9 \catcode`\↑↑M=5 \catcode`\↑↑?=15
\endtt
Thus `|\|' is already an escape character, ↑↑{backslash}
`\]' is a space, ↑↑\<space>
and `|%|' is available for comments on the first line of the file;
ASCII ↑\<null> is ignored, ASCII ↑\<return> is an end-of-line character,
and ASCII ↑\<delete> is invalid.
The ↑|\message| command shown above prints a progress report on the terminal
when |plain.tex| is being input by |INITEX|. Later on comes
`|\message{registers,}|' and several other messages, but we won't mention
them specifically. The terminal will eventually display something like
this when initialization is complete:
\begintt
** plain
(plain.tex Preloading the plain format: codes, registers,
parameters, fonts, more fonts, macros, math definitions,
output routines, hyphenation (hyphen.tex))
* \dump
Beginning to dump on file plain.fmt
\endtt
followed by a variety of statistics about what fonts were loaded, etc.
If you want to make a new format |super.tex| that adds more features
to |plain.tex|, it's best not to make a new file containing all the
plain stuff, or even to |\input plain|; just type `|&plain super|' in
response to |INITEX|'s ↑|**| prompt, ↑↑{ampersand} ↑↑|fmt|
to input |plain.fmt| at high speed.
After the opening |\message|, |plain.tex| goes on to define a control
sequence ↑|\dospecials| that lists all the characters whose catcodes should
probably be changed to~12 (other) when copying things verbatim:
\beginlines
|\def\dospecials{\do\ \do\\\do\{\do\}\do\$\do\&%|
| \do\#\do\↑\do\↑↑K\do\_\do\↑↑A\do\%\do\~}|
\endlines
(Appendix E illustrates how to use |\dospecials|.) \ The ASCII codes for
\<null>, \<tab>, \<linefeed>, \<formfeed>, \<return>, and \<delete>
have not been included in the list.
At this point |plain.tex| completes its initialization of category codes
by setting |\catcode`\@=11|, thereby making the character `|@|' behave
temporarily like a letter. The command |\catcode`\@=12| will appear later,
hence ↑{at-sign characters} will act just like ordinary punctuation
marks when \TeX\ is running. The idea is to make it easy for plain \TeX\
to have ↑{private control sequences} that cannot be redefined by ordinary
users; all such control sequences will have at least one `|@|' in
their names.
The next job is to set up the ↑|\mathcode| table:
\beginlines
|\mathcode`\↑↑@="2201 \mathcode`\↑↑A="3223 \mathcode`\↑↑B="010B|
|\mathcode`\↑↑C="010C \mathcode`\↑↑D="225E \mathcode`\↑↑E="023A|
|\mathcode`\↑↑F="3232 \mathcode`\↑↑G="0119 \mathcode`\↑↑H="0115|
|\mathcode`\↑↑I="010D \mathcode`\↑↑J="010E \mathcode`\↑↑K="3222|
|\mathcode`\↑↑L="2206 \mathcode`\↑↑M="2208 \mathcode`\↑↑N="0231|
|\mathcode`\↑↑O="0140 \mathcode`\↑↑P="321A \mathcode`\↑↑Q="321B|
|\mathcode`\↑↑R="225C \mathcode`\↑↑S="225B \mathcode`\↑↑T="0238|
|\mathcode`\↑↑U="0239 \mathcode`\↑↑V="220A \mathcode`\↑↑W="3224|
|\mathcode`\↑↑X="3220 \mathcode`\↑↑Y="3221 \mathcode`\↑↑Z="8000|
|\mathcode`\↑↑[="2205 \mathcode`\↑↑\="3214 \mathcode`\↑↑]="3215|
|\mathcode`\↑↑↑="3211 \mathcode`\↑↑_="225F \mathcode`\↑↑?="1273|
|\mathcode`\ ="8000 \mathcode`\!="5021 \mathcode`\'="8000|
|\mathcode`\(="4028 \mathcode`\)="5029 \mathcode`\*="2203|
|\mathcode`\+="202B \mathcode`\,="613B \mathcode`\-="2200|
|\mathcode`\.="013A \mathcode`\/="013D \mathcode`\:="303A|
|\mathcode`\;="603B \mathcode`\<="313C \mathcode`\=="303D|
|\mathcode`\>="313E \mathcode`\?="503F \mathcode`\[="405B|
|\mathcode`\\="026E \mathcode`\]="505D \mathcode`\_="8000|
|\mathcode`\{="4266 \mathcode`\|\||="026A \mathcode`\}="5267|
\endlines
A mathcode is relevant only when the corresponding category code is
11 or~12; therefore many of these codes will rarely be looked at. For
example, the math code for |↑↑M| specifies the character |\oplus|,
but it's hard to imagine a user who would want |↑↑M| (ASCII ↑\<return>)
to produce an~$\oplus$ sign in the middle of a math formula, since plain
\TeX\ appends |↑↑M| to the end of every line of input. The math codes
have been set up here, however, to be entirely consistent with the
extended character set presented in Appendix~C and the Computer Modern
fonts described in Appendix~F\null. |INITEX| has done the rest of the
work, as far as mathcodes are concerned: It has set |\mathcode|$\,x=
x+\hex{7000}$ for each of the ten digits $x={}$|`0| to |`9|;
|\mathcode|$\,x=x+\hex{7100}$ for each of the 52~letters; and
|\mathcode|$\,x=x$ for all other values of~$x$.
There's no need to change the ↑|\uccode| and ↑|\lccode| tables. |INITEX|
has made |\uccode`X=`X|, |\uccode`x=`X|, |\lccode`X=`x|, |\lccode`x=`x|,
and it has made similar assignments for all other letters. The codes are
zero for all nonletters. These tables are used by \TeX's ↑|\uppercase|
and |\lowercase| operations, and the hyphenation algorithm also looks
at |\lccode| (see Appendix~H\null). Changes should be made only in format
packages that set \TeX\ up for languages with more than~26 letters
(see Chapter~8).
Next comes the ↑|\sfcode| table, which |INITEX| has initialized entirely
to 1000, except that |\sfcode`X=999| for each of the 26 uppercase letters.
Some characters are made ``transparent'' by setting
\beginlines
|\sfcode`\)=0 \sfcode`\'=0 \sfcode`\]=0 % won't change the space factor|
\endlines
and the |\nonfrenchspacing| macro will be used later to change the sfcodes
of special punctuation marks. \ (Chapter~12 explains what an |\sfcode| does.)
The last code table is called ↑|\delcode|, and again it's necessary to
change only a few values. |INITEX| has made all delimiter codes equal to
$-1$, which means that no characters are recognized as delimiters in
formulas. But there's an exception: The value |\delcode`\.=0| has been
prespecified, so that `|.|' ↑↑{period} stands for a ``↑{null delimiter}.''
\ (See Chapter~17.) \ Plain format sets up the following nine values,
based on the delimiters available in Computer Modern:
\beginlines
|\delcode`\(="028300 \delcode`\/="02F30E \delcode`\)="029301|
|\delcode`\[="05B302 \delcode`\|\||="26A30C \delcode`\]="05D303|
|\delcode`\<="26830A \delcode`\\="20430F \delcode`\>="26930B|
\endlines
It's important to note that |\delcode`\{| and |\delcode`\}| have been left
equal to~$-1$. If those codes were set to certain values, a user would
↑↑{left brace} ↑↑{right brace} be able to type, e.g.,
`|\big{|' to get a big left brace; but it would be a big mistake.
The reason is that ↑{braces} are used for grouping, when supplying
arguments to macros; all sorts of strange things can happen if you try
to use them both as math delimiters and group delimiters.
At this point the |plain.tex| file contains several definitions
\beginlines
|\chardef\@ne=1 \chardef\tw@=2 \chardef\thr@@=3 \chardef\sixt@@n=16|
|\chardef\@cclv=255 \mathchardef\@cclvi=256|
|\mathchardef\@m=1000 \mathchardef\@M=10000 \mathchardef\@MM=20000|
\endlines
which allow ``private'' control sequences ↑|\@ne|, |\tw@|, etc.,
to be used as abbreviations for commonly used constants 1,~2,~\dots; this
convention makes \TeX\ run a little faster, ↑↑{optimization} ↑↑{efficiency}
and it means that the macros will consume slightly less memory space.
The usage of these abbreviations will not, however, be shown below
unless necessary; we shall pretend that `|1|\]' appears instead of\/ |\@ne|,
`|10000|\]' instead of\/ |\@M|, and so on, since that makes the programs
more readable. \ (Notice that the long form of\/ |\@ne| is `|1|\]' including
a space, because \TeX\ looks for and removes a space following a constant.)
\subsection Allocation of registers. The second major part of the
|plain.tex| file provides a foundation on which systems of independently
developed macros can coexist peacefully without interfering in their
usage of ↑{registers}. The idea is that macro writers should abide by the
↑↑{macro conventions}
following ground rules: (1)~Registers numbered 0~to~9 are always free for
temporary ``↑{scratch}'' use, but their values are always assumed to be
clobbered whenever any other macro might get into control. \ (This applies
to registers like |\dimen0|, |\toks0|, |\skip1|, |\box3|, etc.; but \TeX\
has already reserved |\count0| through |\count9| for page number
identification.) \ (2)~The registers |\count255|, |\dimen255|, and
|\skip255| are freely available in the same way.
\ (3)~All assignments to the scratch registers whose numbers are
1,~3, 5, 7, and~9 should be ↑|\global|; all assignments to the
other scratch registers (0,~2, 4, 6, 8,~255) should be non-|\global|.
\ (This prevents the phenomenon of ``↑{save stack buildup}'' discussed
in Chapter~27.)
\ (4)~Furthermore, it's possible to
use any register in a group, if you ensure that \TeX's grouping
mechanism will restore the register when you're done with the group, and
if you are certain that other macros will not make global assignments
to that register when you need it. \ (5)~But when a register is used
by several macros, or over long spans of time, it should be allocated
by |\newcount|, |\newdimen|, |\newbox|, etc. \ (6)~Similar remarks
apply to ↑{input/output streams} used by ↑|\read| and ↑|\write|, to math
↑{families} used by ↑|\fam|, and to insertions (which require
↑|\box|, ↑|\count|, ↑|\dimen|, and ↑|\skip| registers all having the
same number).
Some handy abbreviations are introduced at this point so that the macros
below will have easy access to scratch registers:
\beginlines
|\countdef\count@=255 \toksdef\toks@=0 \skipdef\skip@=0|
|\dimendef\dimen@=0 \dimendef\dimen@i=1 \dimendef\dimen@ii=2|
\endlines
Here now are the macros that provide allocation for quantities of more
permanent value. These macros use registers
|\count10| through |\count19| to hold the numbers that were allocated
most recently; for example, if\/ |\newdimen| has just reserved |\dimen15|,
the value of\/ |\count11| will be~15. However, the rest of the world
is not supposed to ``know'' that |\count11| has anything to do with
|\dimen| registers. There's a special counter called ↑|\allocationnumber|
that will be equal to the most recently allocated number, after every
|\newcount|, |\newdimen|, \dots, |\newinsert| operation; macro packages
are supposed to refer to |\allocationnumber| if they want to find out
what number was allocated. It turns out that |\allocationnumber| is
|\count20|, but other packages aren't supposed to know that either.
In other words, the inside story of how allocation is actually performed
should not be relevant when the allocation macros are used at a higher level;
you mustn't assume that |plain.tex| really does allocation in any
particular way. % In fact, it doesn't work exactly as stated here.
\beginlines
|\count10=21 % this counter allocates \count registers 22, 23, 24, ...|
|\count11=9 % this counter allocates \dimen registers 10, 11, 12, ...|
|\count12=9 % this counter allocates \skip registers 10, 11, 12, ...|
|\count13=9 % this counter allocates \muskip registers 10, 11, 12, ...|
|\count14=9 % this counter allocates \box registers 10, 11, 12, ...|
|\count15=9 % this counter allocates \toks registers 10, 11, 12, ...|
|\count16=-1 % this counter allocates input streams 0, 1, 2, ...|
|\count17=-1 % this counter allocates output streams 0, 1, 2, ...|
|\count18=3 % this counter allocates math families 4, 5, 6, ...|
|\count19=255 % this counter allocates insertions 254, 253, 252, ...|
|\countdef\insc@unt=19 % nickname for the insertion counter|
|\countdef\allocationnumber=20 % the most recent allocation|
|\countdef|↑|\m@ne||=21 \m@ne=-1 % a handy constant|
|\def|↑|\wlog||{\immediate\write-1} % this will write on log file (only)|
\smallbreak
|\outer\def|↑|\newcount||{\alloc@0\count\countdef\insc@unt}|
|\outer\def|↑|\newdimen||{\alloc@1\dimen\dimendef\insc@unt}|
|\outer\def|↑|\newskip||{\alloc@2\skip\skipdef\insc@unt}|
|\outer\def|↑|\newmuskip||{\alloc@3\muskip\muskipdef\@cclvi}|
|\outer\def|↑|\newbox||{\alloc@4\box\chardef\insc@unt}|
|\let\newtoks=\relax % this allows plain.tex to be read in twice|
|\outer\def\newhelp#1#2{\newtoks#1#1=\expandafter{\csname#2\endcsname}}|
|\outer\def|↑|\newtoks||{\alloc@5\toks\toksdef\@cclvi}|
|\outer\def|↑|\newread||{\alloc@6\read\chardef\sixt@@n}|
|\outer\def|↑|\newwrite||{\alloc@7\write\chardef\sixt@@n}|
|\outer\def|↑|\newfam||{\alloc@8\fam\chardef\sixt@@n}|
\smallbreak
|\def\alloc@#1#2#3#4#5{\global\advance\count1#1 by 1|\parbreak%
| \ch@ck#1#4#2% make sure there's still room|\parbreak%
| \allocationnumber=\count1#1|\parbreak%
| \global#3#5=\allocationnumber|\parbreak%
| \wlog{\string#5=\string#2\the\allocationnumber}}|
\smallbreak
|\outer\def|↑|\newinsert||#1{\global\advance\insc@unt by-1|\parbreak%
| \ch@ck0\insc@unt\count \ch@ck1\insc@unt\dimen|\parbreak%
| \ch@ck2\insc@unt\skip \ch@ck4\insc@unt\box|\parbreak%
| \allocationnumber=\insc@unt|\parbreak%
| \global\chardef#1=\allocationnumber|\parbreak%
| \wlog{\string#1=\string\insert\the\allocationnumber}}|
\smallbreak
|\def\ch@ck#1#2#3{\ifnum\count1#1<#2%|\parbreak%
| \else\errmessage{No room for a new #3}\fi}|↑↑|No room|
\endlines
The `|\alloc@|' macro does most of the work of allocation. It puts
a message like `|\maxdimen=\dimen10|' into the log file after
|\newdimen| has allocated a place for the |\dimen| register that
will be called |\maxdimen|; such information might be useful when
difficult macros are being ↑{debugged}.
A ↑|\newhelp| macro has been provided to aid in creating home-made help
texts: You can say, e.g., |\newhelp\helpout{This is a help message.}|, and
then give the command `↑|\errhelp||=\helpout|' just before issuing an
↑|\errmessage|. This method of creating help texts makes efficient
use of \TeX's ↑{memory}, because it puts the text into a control sequence
name where it doesn't take up space that is needed for tokens.
The |plain| file now goes ahead and allocates registers for important constants:
\beginlines
|\newdimen\maxdimen \maxdimen=16383.99999pt|
|\newskip\hideskip \hideskip=-1000pt plus1fill|
|\newskip\centering \centering=0pt plus 1000pt minus 1000pt|
|\newdimen\p@ \p@=1pt % this saves macro space and time|
|\newdimen\z@ \z@=0pt| % likewise
|\newskip\z@skip \z@skip=0pt plus0pt minus0pt|
|\newbox\voidb@x % permanently void box register|
\endlines
The control sequence ↑|\maxdimen| stands for the largest permissible
\<dimen>. Alignment macros that appear below will make use of special glue
values called ↑|\hideskip| and ↑|\centering|. {\sl N.B.: These three constants
must not be changed under any circumstances\/}; you should either ignore
them completely or just use them and enjoy them.
In fact, the next four constant registers (↑|\p@|, ↑|\z@|, ↑|\z@skip|,
and ↑|\voidb@x|) have been given private names so that they are untouchable.
The control sequence |\p@| is used several dozen times as an abbreviation
for `|pt |', and |\z@| is used quite often to stand for either `|0pt |' or
`|0 |'; the use of such abbreviations saves almost 10\% of the space
needed to store the tokens in plain \TeX's macros. But we shall stick to
↑↑{optimization}
the unabbreviated forms below, so that the macros are more readable.
A different sort of allocation comes next:
↑↑|\string|↑↑|\escapechar|↑↑|\uppercase|↑↑|\iftrue|↑↑|\iffalse|
\beginlines
|\outer\def\newif#1{\count@=\escapechar \escapechar=-1|\parbreak%
| |↑|\expandafter||\expandafter\expandafter|\parbreak%
| |↑|\edef||\@if#1{true}{\let|↑|\noexpand||#1=\noexpand\iftrue}%|\parbreak%
| \expandafter\expandafter\expandafter|\parbreak%
| \edef\@if#1{false}{\let\noexpand#1=\noexpand\iffalse}%|\parbreak%
| \@if#1{false}\escapechar=\count@} % the condition starts out false|\parbreak%
|\def\@if#1#2{|↑|\csname||\expandafter\if@\string#1#2\endcsname}|\parbreak%
|{\uccode`1=`i \uccode`2=`f \uppercase{\gdef\if@12{}}} % `if' is required|
\endlines
For example, the command |\newif\ifalpha| creates a trio of control
sequences called |\alphatrue|, |\alphafalse|, and |\ifalpha|
(see Chapter~20).
\subsection Parameters. |INITEX| sets almost all of the numeric registers
and parameters equal to zero; it makes all of the token registers and parameters
empty; and it makes all of the box registers void. But there are a few
↑↑{parameters, default values} ↑↑{default values of parameters}
exceptions: ↑|\mag| is set initially to~1000, ↑|\tolerance| to~10000,
↑|\maxdeadcycles| to~25, ↑|\hangafter| to~1, ↑|\escapechar| to~|`\\|, and
↑|\endlinechar| to~|`\↑↑M|. Plain \TeX\ assigns new parameter values as
follows:
\beginlines
↑|\pretolerance||=100 |↑|\tolerance||=200 |↑|\hbadness||=1000 |%
↑|\vbadness||=1000|
↑|\linepenalty||=10 |↑|\hyphenpenalty||=50 |↑|\exhyphenpenalty||=50|
↑|\binoppenalty||=700 |↑|\relpenalty||=500|
↑|\clubpenalty||=150 |↑|\widowpenalty||=150 |↑|\displaywidowpenalty||=50|
↑|\brokenpenalty||=100 |↑|\predisplaypenalty||=10000|
↑|\doublehyphendemerits||=10000 |↑|\finalhyphendemerits||=5000 |%
↑|\adjdemerits||=10000|
↑|\tracinglostchars||=1 |↑|\uchyph||=1 |↑|\delimiterfactor||=901|
↑|\defaulthyphenchar||=`\- |↑|\defaultskewchar||=-1 |%
↑|\newlinechar||=-1|
↑|\showboxbreadth||=5 |↑|\showboxdepth||=3|
\smallbreak
↑|\hfuzz||=0.1pt |↑|\vfuzz||=0.1pt |↑|\overfullrule||=5pt|
↑|\hsize||=6.5in |↑|\vsize||=8.9in |↑|\parindent||=20pt|
↑|\maxdepth||=4pt |↑|\splitmaxdepth||=\maxdimen |↑|\boxmaxdepth||=\maxdimen|
↑|\delimitershortfall||=5pt |↑|\nulldelimiterspace||=1.2pt |%
↑|\scriptspace||=0.5pt|
\smallbreak
↑|\parskip||=0pt plus 1pt|
↑|\abovedisplayskip||=12pt plus 3pt minus 9pt|
↑|\abovedisplayshortskip||=0pt plus 3pt|
↑|\belowdisplayskip||=12pt plus 3pt minus 9pt|
↑|\belowdisplayshortskip||=7pt plus 3pt minus 4pt|
↑|\topskip||=10pt |↑|\splittopskip||=10pt|
↑|\parfillskip||=0pt plus 1fil|
\smallbreak
↑|\thinmuskip||=3mu|
↑|\medmuskip||=4mu plus 2mu minus 4mu|
↑|\thickmuskip||=5mu plus 5mu|
\endlines
(Some parameters are set by \TeX\ itself as it runs, so it is inappropriate
to initialize them: ↑|\time|, ↑|\day|, ↑|\month|, and ↑|\year| are established
at the beginning of a job; ↑|\outputpenalty| is given a value when an
|\output| routine is invoked; ↑|\predisplaysize|, ↑|\displaywidth|,
and ↑|\displayindent| get values just before a display is processed;
and the values ↑|\looseness||=0|, ↑|\hangindent||=0pt|, ↑|\hangafter||=1|,
↑|\parshape||=0| are assigned at the end of a paragraph and when \TeX\ enters
internal vertical mode.)
The parameters ↑|\baselineskip|, ↑|\lineskip|, and ↑|\lineskiplimit| have not
been initialized here, but a macro called ↑|\normalbaselines| is defined below;
this macro sets |\baselineskip=\normalbaselineskip|,
|\lineskip=\normallineskip|, and |\lineskiplimit=\normallineskiplimit|.
An indirect approach like this has been used so that several different
type sizes may be handled, as illustrated in Appendix~E\null. Plain \TeX\
deals exclusively with $10\pt$ type, but it supports extension to other styles.
Some ``↑{pseudo parameters}'' come next. These quantities behave just like
internal parameters of \TeX, and users are free to change them in the same
way, but they are part of the plain \TeX\ format
rather than primitives of the language. ↑↑{parameters, pseudo}
\beginlines
|\newskip|↑|\smallskipamount|| % the amount of a \smallskip|
| \smallskipamount=3pt plus1pt minus1pt|
|\newskip|↑|\medskipamount|| % the amount of a \medskip|
| \medskipamount=6pt plus2pt minus2pt|
|\newskip|↑|\bigskipamount|| % the amount of a \bigskip|
| \bigskipamount=12pt plus4pt minus4pt|
|\newskip|↑|\normalbaselineskip|| % normal value of \baselineskip|
| \normalbaselineskip=12pt|
|\newskip|↑|\normallineskip|| % normal value of \lineskip|
| \normallineskip=1pt|
|\newdimen|↑|\normallineskiplimit|| % normal value of \lineskiplimit|
| \normallineskiplimit=0pt|
|\newdimen|↑|\jot|| % unit of measure for opening up displays|
| \jot=3pt|
|\newcount|↑|\interdisplaylinepenalty|| % interline penalty in \displaylines|
| \interdisplaylinepenalty=100|
|\newcount|↑|\interfootnotelinepenalty|| % interline penalty in footnotes|
| \interfootnotelinepenalty=100|
\endlines
\subsection Font information. Now |plain.tex| brings in the data that \TeX\
needs to know about how to typeset lots of characters in lots of different
fonts. First the ↑|\magstep| macros are defined, to support font scaling:
\beginlines
|\def|↑|\magstephalf||{1095 }|
|\def\magstep#1{\ifcase#1 1000\or|
| 1200\or 1440\or 1728\or 2074\or 2488\fi\relax}|
\weakendlines
(Incidentally, |\magstep| doesn't use ↑|\multiply| to compute values,
since it is supposed to expand to a ↑\<number> enroute to \TeX's
``stomach''; ↑↑{anatomy} |\multiply| wouldn't work, because
it is an assignment command, performed only in the stomach.)
One of the main things that distinguishes one format from another
is the fact that each format gives \TeX\ the necessary knowledge about
a certain family of typefaces. In this case the ↑{Computer Modern} types
described in Appendix~F are taken as a basis, although there is a provision
for incorporating other styles.
\beginlines
|\font|↑|\tenrm||=cmr10 \font\preloaded=cmr9 \font\preloaded=cmr8|
\nobreak
|\font\sevenrm=cmr7 \font\preloaded=cmr6 \font\fiverm=cmr5|
\smallskip
|\font\teni=cmmi10 \font\preloaded=cmmi9 \font\preloaded=cmmi8|
\nobreak
|\font\seveni=cmmi7 \font\preloaded=cmmi6 \font\fivei=cmmi5|
\smallbreak
|\font\tensy=cmsy10 \font\preloaded=cmsy9 \font\preloaded=cmsy8|
\nobreak
|\font\sevensy=cmsy7 \font\preloaded=cmsy6 \font\fivesy=cmsy5|
\nobreak\smallskip
|\font\tenex=cmex10|
\smallbreak
|\font\tenbf=cmbx10 \font\preloaded=cmbx9 \font\preloaded=cmbx8|
\nobreak
|\font\sevenbf=cmbx7 \font\preloaded=cmbx6 \font\fivebf=cmbx5|
\smallskip
|\font\tensl=cmsl10 \font\preloaded=cmsl9 \font\preloaded=cmsl8|
\nobreak
|\font\tentt=cmtt10 \font\preloaded=cmtt9 \font\preloaded=cmtt8|
\nobreak
|\font\tenit=cmti10 \font\preloaded=cmti9 \font\preloaded=cmti8|
\nobreak
|\font\preloaded=cmss10 \font\preloaded=cmssq8|
\nobreak
|\font\preloaded=cmssi10 \font\preloaded=cmssqi8|
\smallskip
|\font\preloaded=cmr7 scaled \magstep4 % for titles|
\nobreak
|\font\preloaded=cmtt10 scaled \magstep2|
\nobreak
|\font\preloaded=cmssbx10 scaled \magstep2|
\smallskip
|% Additional \preloaded fonts can be specified here.|
|% (And those that were \preloaded above can be eliminated.)|
|\let\preloaded=\undefined % preloaded fonts must be declared anew later.|
\endlines
Notice that most of the fonts have been called ↑|\preloaded|; but the
control sequence |\preloaded| is made undefined at the very end, so those
fonts cannot be used directly. There are two reasons for this strange
approach: First, it is desirable to keep the total number of fonts
of plain \TeX\ relatively small, because plain \TeX\ is a sort of
standard format; it shouldn't cost much for someone to acquire all the
fonts of plain \TeX\ in addition to those he really wants. Second, it
is desirable on many computer systems to preload the information for
most of the fonts that people will actually be using, since this saves
a lot of machine time. The |\preloaded| font
information goes into \TeX's memory, where it will come alive instantly
if the user defines the corresponding |\font| again. For example, the
book format in Appendix~E says `|\font\ninerm=cmr9|'; after that
assignment has been obeyed, the control sequence |\ninerm| will
identify the |cmr9| font, whose information does not have to loaded again.
The exact number and nature of fonts that are preloaded is unimportant;
the only important thing needed for standardization between machines
is that sixteen basic fonts (|cmr10|, |cmr7|, \dots,~|cmti10|) should
actually be loaded. The |plain.tex| files used on different machines
can be expected to differ widely with respect to preloaded fonts,
since the choice of how many fonts to preload and the selection of the
most important fonts depends on local conditions.
For example, at the author's university it is useful to preload a
font that contains the Stanford seal, but that particular font is not
very popular at Berkeley.
Most of these fonts have the default values of\/ ↑|\hyphenchar| and
↑|\skewchar|, namely |`-| and |-1|; but the math italic and math symbol fonts
have special |\skewchar| values, which are defined next:
\beginlines
|\skewchar\teni='177 \skewchar\seveni='177 \skewchar\fivei='177|
|\skewchar\tensy='60 \skewchar\sevensy='60 \skewchar\fivesy='60|
\endlines
Once the fonts are loaded, they are also grouped into families for
use in math setting, and shorthand names like ↑|\rm| and~↑|\it| are defined:
\beginlines
|\textfont0=\tenrm \scriptfont0=\sevenrm |↑|\scriptscriptfont||0=\fiverm|
\nobreak
|\def\rm{\fam0 \tenrm}|
↑|\textfont||1=\teni |↑|\scriptfont||1=\seveni \scriptscriptfont1=\fivei|
\nobreak
|\def|↑|\mit||{\fam1 } \def|↑|\oldstyle||{\fam1 \teni}|
|\textfont2=\tensy \scriptfont2=\sevensy \scriptscriptfont2=\fivesy|
\nobreak
|\def|↑|\cal||{\fam2 }|
|\textfont3=\tenex \scriptfont3=\tenex \scriptscriptfont3=\tenex|
\smallbreak
|\newfam\itfam \def\it{\fam\itfam\tenit} \textfont\itfam=\tenit|
|\newfam\slfam \def|↑|\sl||{\fam\slfam\tensl} \textfont\slfam=\tensl|
|\newfam\bffam \def|↑|\bf||{\fam\bffam\tenbf} \textfont\bffam=\tenbf|
\nobreak
| \scriptfont\bffam=\sevenbf \scriptscriptfont\bffam=\fivebf|
↑|\newfam||\ttfam \def|↑|\tt||{\fam\ttfam\tentt} \textfont\ttfam=\tentt|
\endlines
\subsection Macros for text. The fifth part of |plain.tex| introduces
macros that do basic formatting unrelated to mathematics. First come
some macros that were promised above:
\beginlines
|\def|↑|\frenchspacing||{\sfcode`\.=1000 \sfcode`\?=1000 \sfcode`\!=1000|
\nobreak
| \sfcode`\:=1000 \sfcode`\;=1000 |↑|\sfcode||`\,=1000 }|
|\def|↑|\nonfrenchspacing||{\sfcode`\.=3000 \sfcode`\?=3000 \sfcode`\!=3000|
\nobreak
| \sfcode`\:=2000 \sfcode`\;=1500 \sfcode`\,=1250 }|
|\def|↑|\normalbaselines||{\lineskip=\normallineskip|
\nobreak
| \baselineskip=\normalbaselineskip \lineskiplimit=\normallineskiplimit}|
\endlines
The next macros are simple but vital. ↑↑{control tab}↑↑{control return}
↑↑{control space} First |\|\<tab> and |\|\<return> are defined so that they
expand to |\|\<space>; this helps to prevent confusion, since all three
cases look identical when displayed on most computer terminals.
Then the macros ↑|\lq|, ↑|\rq|, ↑|\lbrack|, and ↑|\rbrack| are defined,
for people who have difficulty typing quotation marks and/or brackets. The
control sequences ↑|\endgraf|
and ↑|\endline| are made equivalent to \TeX's primitive ↑|\par| and~↑|\cr|
operations, since it is often useful to redefine the meanings of\/ |\par|
and~|\cr| themselves. Then come the definitions of\/ ↑|\space| (a blank space),
↑|\empty| (a~list of no tokens), and ↑|\null| (an~empty hbox). Finally,
↑|\bgroup| and ↑|\egroup| are made to provide ``implicit'' grouping characters
that turn out to be especially useful in macro definitions. \ (See Chapters
24--26 and Appendix~D for information about ↑{implicit characters}.)
\beginlines
|\def\↑↑I{\ } \def\↑↑M{\ }|
|\def\lq{`} \def\rq{'} \def\lbrack{[} \def\rbrack{]}|
|\let\endgraf=\par \let\endline=\cr|
|\def\space{ } \def\empty{} \def\null{\hbox{}}|
|\let\bgroup={ \let\egroup=}|
\endlines
Something a bit tricky comes up now in the definitions of\/ ↑|\obeyspaces|
and ↑|\obeylines|, since \TeX\ is only ``half obedient'' while these
definitions are half finished:
\beginlines
|\def\obeyspaces{\catcode`\ =\active}|
|{\obeyspaces\global\let =\space}|
|{\catcode`\↑↑M=\active % these lines must end with `%'|
\nobreak
| \gdef\obeylines{\catcode`\↑↑M=\active \let↑↑M=\par}%|
\nobreak
| \global\let↑↑M=\par} % this is in case ↑↑M appears in a \write|
\endlines
The |\obeylines| macro says `|\let↑↑M=\par|' instead of `|\def↑↑M{\par}|'
because the |\let| technique allows constructions such as
`|\let\par=\cr| |\obeylines| ↑|\halign||{...}|' in which ↑|\cr|'s need
not be given within the alignment.
The ↑|\loop||...|↑|\repeat| macro provides for iterative operations
as illustrated at the end of Chapter~20. In this macro and several others,
the control sequence `↑|\next|' is given a temporary value that is not
going to be needed later; thus, |\next| acts like a ``↑{scratch control
sequence}.''
\beginlines
|\def\loop#1\repeat{\def\body{#1}\iterate}|
|\def\iterate{\body \let\next=\iterate \else\let\next=\relax\fi \next}|
|\let\repeat=\fi % this makes \loop...\if...\repeat skippable|
\endlines
Spacing is the next concern. The macros ↑|\enskip|, ↑|\quad|, and ↑|\qquad|
provide spaces that are legitimate breakpoints within a paragraph;
↑|\enspace|, ↑|\thinspace|, and ↑|\negthinspace| produce space that cannot
cause a break (although the space will disappear if it occurs just
next to certain kinds of breaks). All six of these spaces are relative
to the current font. You can get horizontal space that
never disappears by saying `↑|\hglue|\<glue>'; this space is able to
stretch or shrink. Similarly, there's a vertical analog,
`↑|\vglue|\<glue>'.
The ↑|\nointerlineskip| macro suppresses interline glue that would
ordinarily be inserted before the next box in vertical mode; this is a
``one shot'' macro, but ↑|\offinterlineskip| is more drastic---it sets
things up so that future ↑{interline glue} will be present, but zero.
There also are macros for potentially breakable vertical spaces:
↑|\smallskip|, ↑|\medskip|, and ↑|\bigskip|.
\beginlines
|\def\enskip{\hskip.5em\relax}|
|\def\quad{\hskip1em\relax} \def\qquad{\hskip2em\relax}|
|\def\enspace{\kern.5em }|
|\def\thinspace{\kern .16667em } \def\negthinspace{\kern-.16667em }|
\smallbreak
|\def\hglue{|↑|\afterassignment||\hgl@\skip@=}|
|\def\hgl@{\leavevmode \count@=\spacefactor \vrule width0pt|
| \nobreak\hskip\skip@ \spacefactor=\count@}|
|\def\vglue{\afterassignment\vgl@\skip@=}|
|\def\vgl@{\par \dimen@=\prevdepth \hrule height0pt|
| \nobreak\vskip\skip@ \prevdepth=\dimen@}|
\smallbreak
|\def\nointerlineskip{\prevdepth=-1000pt }|
|\def\offinterlineskip{\baselineskip=-1000pt|
| \lineskip=0pt \lineskiplimit=\maxdimen}|
\smallbreak
|\def\smallskip{\vskip\smallskipamount}|
|\def\medskip{\vskip\medskipamount}|
|\def\bigskip{\vskip\bigskipamount}|
\endlines
Speaking of breakpoints, the following macros introduce ↑{penalty} markers
that make breaking less, or more, desirable. The ↑|\break|, ↑|\nobreak|,
and ↑|\allowbreak| macros are intended for use in any mode; the |~|~(tie)
and ↑|\slash| (hyphen-like~`/') macros are intended for horizontal mode.
The others are intended only for vertical mode, i.e., between paragraphs,
so they begin with |\par|.
\beginlines
|\def\break{\penalty-10000 } \def\nobreak{\penalty10000 }|
|\def\allowbreak{\penalty0 }|
|\def~{\penalty10000\ }|
|\def\slash{/\penalty\exhyphenpenalty}|
\smallbreak
|\def|↑|\filbreak||{\par\vfil\penalty-200\vfilneg}|
|\def|↑|\goodbreak||{\par\penalty-500 }|
|\def|↑|\eject||{\par\penalty-10000 }|
|\def|↑|\supereject||{\par\penalty-20000 }|
\smallbreak
|\def|↑|\removelastskip||{\ifdim\lastskip=0pt \else\vskip-\lastskip\fi}|
|\def|↑|\smallbreak||{\par \ifdim\lastskip<\smallskipamount|\parbreak%
| \removelastskip \penalty-50 \smallskip \fi}|
|\def|↑|\medbreak||{\par \ifdim\lastskip<\medskipamount|\parbreak%
| \removelastskip \penalty-100 \medskip \fi}|
|\def|↑|\bigbreak||{\par \ifdim\lastskip<\bigskipamount|\parbreak%
| \removelastskip \penalty-200 \bigskip \fi}|
\endlines
Boxes are next: ↑|\line|, ↑|\leftline|, ↑|\rightline|, and ↑|\centerline|
produce boxes of the full line width, while ↑|\llap| and ↑|\rlap| make
boxes whose effective width is zero. The ↑|\underbar| macro puts its
argument into an hbox with a straight line at a fixed distance under it.
\beginlines
|\def\line{\hbox to\hsize}|
|\def\leftline#1{\line{#1\hss}} \def\rightline#1{\line{\hss#1}}|
|\def\centerline#1{\line{\hss#1\hss}}|
\smallskip
|\def\llap#1{\hbox to 0pt{\hss#1}} \def\rlap#1{\hbox to 0pt{#1\hss}}|
\smallskip
|\def\m@th{\mathsurround=0pt }|
|\def\underbar#1{$\setbox0=\hbox{#1} \dp0=0pt|\parbreak%
| \m@th \underline{\box0}$}|
\endlines
(Notice that |\underbar| uses math mode to do its job, although the
operation is essentially non-mathematical in nature. A few of the other
macros below use math mode in similar ways; thus, \TeX's mathematical
abilities prove to be useful even when no mathematical typesetting
is actually being done. A special control sequence ↑|\m@th| is
used to ``turn off'' ↑|\mathsurround| when such constructions are
being performed.)
\smallbreak
A ↑|\strut| is implemented here as a rule of width zero, since this
takes minimum space and time in applications where numerous struts are
present.
\beginlines
|\newbox\strutbox|
|\setbox\strutbox=\hbox{\vrule height8.5pt depth3.5pt width0pt}|
|\def\strut{\relax\ifmmode\copy\strutbox\else\unhcopy\strutbox\fi}|
\weakendlines
The `↑|\relax|' in this macro and in others below is necessary in case
|\strut| appears first in an alignment entry, because \TeX\ is in a
somewhat unpredictable mode at such times (see Chapter~22).
The ↑|\ialign| macro provides for ↑{alignments} when it is necessary to
be sure that ↑|\tabskip| is initially zero. The ↑|\hidewidth| macro can be
used essentially as |\hfill| in alignment entries that are permitted to
``stick out'' of their column. There's also ↑|\multispan|, which permits
alignment entries to span one or more columns.
\beginlines
|\def\ialign{\tabskip=0pt \halign}|
|\def\hidewidth{\hskip\hideskip}|
\smallbreak
|\newcount\mscount|
|\def\multispan#1{\omit \mscount=#1 \loop\ifnum\mscount>1 \sp@n\repeat}|
|\def\sp@n{\span\omit \advance\mscount by -1 }|
\endlines
Now we get to the ``↑{tabbing}'' macros, which are more complicated than
anything else in plain \TeX. They keep track of the tab positions by
maintaining boxes full of empty boxes having the specified widths.
\ (The best way to understand these macros is probably to watch
them in action on simple examples, using |\tracingall|.)
\beginlines
|\newif\ifus@ \newif\if@cr|
|\newbox\tabs \newbox\tabsyet \newbox\tabsdone|
\smallbreak
|\def|↑|\cleartabs||{\global\setbox\tabsyet=\null \setbox\tabs=\null}|
|\def|↑|\settabs||{\setbox\tabs=\null \futurelet\next\sett@b}|
|\let\+=\relax % in case this file is being read in twice|
|\def\sett@b{\ifx\next\+ \let\next=\relax % turn off \outerness|\parbreak%
| \def\next{\afterassignment\s@tt@b\let\next}%|\parbreak%
| \else\let\next=\s@tcols\fi\next}|
|\def\s@tt@b{\let\next=\relax \us@false\m@ketabbox}|
|\outer\def|↑|\+||{\tabalign} \def\tabalign{\us@true \m@ketabbox}|
|\def\s@tcols#1\columns{\count@=#1 \dimen@=\hsize|\parbreak%
| \loop \ifnum\count@>0 \@nother \repeat}|
|\def\@nother{\dimen@ii=\dimen@ \divide\dimen@ii by\count@|\parbreak%
| \setbox\tabs=\hbox{\hbox to\dimen@ii{}\unhbox\tabs}%|\parbreak%
| \advance\dimen@ by-\dimen@ii \advance\count@ by -1 }|
\smallbreak
|\def\m@ketabbox{\begingroup|\parbreak%
| \global\setbox\tabsyet=\copy\tabs \global\setbox\tabsdone=\null|\parbreak%
| \def\cr{\@crtrue\crcr\egroup\egroup|\parbreak%
| \ifus@ \unvbox0 |↑|\lastbox||\fi \endgroup|\parbreak%
| \setbox\tabs=\hbox{\unhbox\tabsyet|↑|\unhbox||\tabsdone}}%|\parbreak%
| \setbox0=\vbox\bgroup\@crfalse \ialign\bgroup&\t@bbox##\t@bb@x\crcr}|
\smallbreak
|\def\t@bbox{\setbox0=\hbox\bgroup}|
|\def\t@bb@x{\if@cr\egroup % now \box0 holds the column|\parbreak%
| \else\hss\egroup \global\setbox\tabsyet=\hbox{\unhbox\tabsyet|\parbreak%
| \global\setbox1=\lastbox}% now \box1 holds its size|\parbreak%
| \ifvoid1 \global\setbox1=\hbox to\wd0{}%|\parbreak%
| \else\setbox0=\hbox to\wd1{\unhbox0}\fi|\parbreak%
| \global\setbox\tabsdone=\hbox{\box1\unhbox\tabsdone}\fi|\parbreak%
| \box0}|
\endlines
The macro |\+| has been declared `↑|\outer|' here, so that \TeX\ will
be better able to detect runaway arguments and definitions (see Chapter~20).
A non-|\outer| version, called ↑|\tabalign|, has also been provided
in case it is necessary to use |\+| in some ``inner'' place.
You can use |\tabalign| just like |\+|, except after ↑|\settabs|.
\textindent{$\bullet$} Paragraph shapes of a limited but important kind
are provided by ↑|\item|, ↑|\itemitem|, and ↑|\narrower|. There are also
two macros that haven't been mentioned before: \ (1)~↑|\hang| causes
hanging indentation by the normal amount of\/ ↑|\parindent|, after the
first line; thus, the entire paragraph will be indented by the same
amount (unless it began with ↑|\noindent|). \ (2)~↑|\textindent||{stuff}|
is like ↑|\indent|, but it puts the `|stuff|' into the indentation, flush
right except for an en~space; it also removes spaces that might follow
the right brace in `|{stuff}|'. For example, the present paragraph
was typeset by the commands `|\textindent{$\bullet$} Paragraph shapes
...|'; the opening `P' occurs at the normal position for a paragraph's
first letter. ↑↑|\bullet| ↑↑|\ignorespaces|
\beginlines
|\def\hang{\hangindent\parindent}|
|\def\item{\par\hang\textindent}|
|\def\itemitem{\par\indent \hangindent2\parindent \textindent}|
|\def\textindent#1{\indent\llap{#1\enspace}\ignorespaces}|
|\def\narrower{\advance\leftskip by\parindent|\parbreak%
| \advance\rightskip by\parindent}|
\endlines
The ↑|\beginsection| macro is intended to mark the beginning of a
new major subdivision in a document; to use it, you say
`|\beginsection|\<section title>' followed by a blank line (or~|\par|).
The macro first does a ↑|\filbreak| (which will start a new page
if the present page is nearly full); then it makes a ↑|\bigskip| and
puts the section title flush left on a line by itself, in boldface type.
The section title is also displayed on the terminal.
After a ↑|\smallskip|, with page break prohibited, a ↑|\noindent|
command is given; this suppresses indentation in the next paragraph,
i.e., in the first paragraph of the new section.
\ (However, the next ``paragraph'' will be empty if vertical mode
material immediately follows the |\beginsection| command.) ↑↑|\message|
\beginlines
|\outer\def\beginsection#1\par{\filbreak\bigskip|\parbreak%
| \message{#1}\leftline{\bf#1}\nobreak\smallskip\vskip-\parskip|\parbreak%
| \noindent}|
\endlines
Special statements in a mathematical paper are often called ↑{theorems},
lemmas, definitions, axioms, postulates, remarks, corollaries, algorithms,
facts, conjectures, or some such things, and they generally are
given special typographic treatment. The ↑|\proclaim| macro, which
was illustrated earlier in this appendix and also in Chapter~20,
puts the title of the proclamation in boldface, then sets the rest
of the paragraph in slanted type. The paragraph is followed by
something similar to ↑|\medbreak|, except that the amount of penalty
is different so that page breaks are discouraged:
\beginlines
|\outer\def\proclaim #1. #2\par{\medbreak\vskip-\parskip|\parbreak%
| \noindent{\bf#1.\enspace}{\sl#2}\par|\parbreak%
| \ifdim\lastskip<\medskipamount \removelastskip\penalty55\medskip\fi}|
\endlines
↑{Ragged-right setting} is initiated by restricting the spaces between
words to have a fixed width, and by putting variable space at the right
of each line. You should not call ↑|\raggedright| until your text font
has already been specified; it is assumed that the ragged-right material
will not be in a variety of different sizes. \ (If this assumption is
not valid, a different approach should be used: ↑|\fontdimen| parameters
3 and~4 of the fonts you will be using should be set to zero, by saying,
e.g., `|\fontdimen3\tenrm=0pt|'. These parameters specify the stretchability
and shrinkability of ↑{interword spaces}.) \ ↑↑|\spaceskip| ↑↑|xspaceskip|
A special macro ↑|\ttraggedright| should be used for ragged-right setting
in ↑{typewriter type}, since the spaces between words are generally
bigger in that style. \ (Spaces are already unstretchable and
unshrinkable in font~|cmtt|.)
\beginlines
|\def\raggedright{\rightskip=0pt plus2em|\parbreak%
| \spaceskip=.3333em \xspaceskip=.5em }|
|\def\ttraggedright{\tt\rightskip=0pt plus2em }|
\endlines
Now we come to special symbols and accents, which depend primarily on
the characters available in the Computer Modern fonts. Different
constructions will be necessary if other styles of type are used.
When a symbol is built up by forming a box, the ↑|\leavevmode| macro
is called first; this starts a new paragraph, if \TeX\ is in vertical
mode, but does nothing if \TeX\ is in horizontal mode or math mode.
\beginlines
|\chardef\%=`\% \chardef\&=`\& \chardef\#=`\# \chardef\$=`\$|%
↑↑{control percent}↑↑{control ampersand}↑↑{control hash}↑↑{control dollar}
|\chardef|↑|\ss||="19|
|\chardef|↑|\ae||="1A \chardef|↑|\oe||="1B \chardef|↑|\o||="1C|
|\chardef|↑|\AE||="1D \chardef|↑|\OE||="1E \chardef|↑|\O||="1F|
|\chardef|↑|\i||="10 \chardef|↑|\j||="11 % dotless letters|
|\def|↑|\aa||{\accent'27a} \def|↑|\l||{\char'40l}|
\smallbreak
|\def\leavevmode{\unhbox\voidb@x} % begins a paragraph, if necessary|
|\def\_{\leavevmode \kern.06em \vbox{\hrule width0.3em}}|↑↑{control underline}
|\def|↑|\L||{\leavevmode\setbox0=\hbox{L}\hbox to\wd0{\hss\char'40L}}|
|\def|↑|\AA||{\leavevmode\setbox0=\hbox{h}\dimen@=\ht0 |%
|\advance\dimen@ by-1ex|\parbreak%
| \rlap{\raise.67\dimen@\hbox{\char'27}}A}|
\smallbreak
|\def|↑|\mathhexbox||#1#2#3{\leavevmode|\parbreak%
| \hbox{$\m@th \mathchar"#1#2#3$}}|
|\def|↑|\dag||{\mathhexbox279} \def|↑|\ddag||{\mathhexbox27A}|
|\def|↑|\S||{\mathhexbox278} \def|↑|\P||{\mathhexbox27B}|
\smallbreak
|\def|↑|\oalign||#1{\leavevmode\vtop{\baselineskip0pt \lineskip.25ex|\parbreak%
| \ialign{##\crcr#1\crcr}}} % put characters over each other|
|\def|↑|\ooalign||{\lineskiplimit-\maxdimen \oalign}|
|\def|↑|\d||#1{\oalign{#1\crcr\hidewidth.\hidewidth}}|
|\def|↑|\b||#1{\oalign{#1\crcr\hidewidth|\parbreak%
| \vbox to.2ex{\hbox{\char'22}\vss}\hidewidth}}|
|\def|↑|\c||#1{\setbox0=\hbox{#1}\ifdim\ht0=1ex \accent'30 #1%|\parbreak%
| \else{\ooalign{\hidewidth\char'30\hidewidth\crcr\unhbox0}}\fi}|
|\def|↑|\copyright||{{\ooalign|\parbreak%
| {\hfil\raise.07ex\hbox{c}\hfil\crcr\mathhexbox20D}}}|
\smallbreak
|\def|↑|\dots||{\relax\ifmmode\ldots\else$\m@th \ldots\,$\fi}|
|\def|↑|\TeX||{T\kern-.1667em \lower.5ex\hbox{E} \kern-.125em X}|
\smallbreak
|\def|↑|\`||#1{{\accent"12 #1}} \def|↑|\'||#1{{\accent"13 #1}}|
|\def|↑|\v||#1{{\accent"14 #1}} \def|↑|\u||#1{{\accent"15 #1}}|
↑↑{esc hat}|\def|↑|\=||#1{{\accent"16 #1}} \def\↑#1{{\accent"5E #1}}|
|\def|↑|\.||#1{{\accent"5F #1}} \def|↑|\H||#1{{\accent"7D #1}}|
↑↑{esc tilde}|\def\~||#1{{\accent"7E #1}} \def|↑|\"||#1{{\accent"7F #1}}|
|\def|↑|\t||#1{{\edef\next{\the\font}\the\textfont1\accent"7F\next#1}}|
\endlines
At this point three alternative control-symbol ↑{accents} are defined,
suitable for keyboards with extended character sets (cf.~Appendix~C):
\beginlines
|\let\↑↑_=\v \let\↑↑S=\u \let\↑↑D=\↑|
\endlines
Various ways to fill space with ↑{leaders} are provided next.
\beginlines
|\def|↑|\hrulefill||{\leaders\hrule\hfill}|
|\def|↑|\dotfill||{\cleaders\hbox{$\m@th \mkern1.5mu . \mkern1.5mu$}\hfill}|
|\def|↑|\rightarrowfill||{$\m@th \mathord- \mkern-6mu|\parbreak%
| \cleaders\hbox{$\mkern-2mu \mathord- \mkern-2mu$}\hfill|\parbreak%
| \mkern-6mu \mathord\rightarrow$}|
|\def|↑|\leftarrowfill|%
|{$\m@th \mathord\leftarrow \mkern-6mu|\parbreak%
| \cleaders\hbox{$\mkern-2mu \mathord- \mkern-2mu$}\hfill|\parbreak%
| \mkern-6mu \mathord-$}|
\smallbreak
|\mathchardef\braceld="37A \mathchardef\bracerd="37B|
|\mathchardef\bracelu="37C \mathchardef\braceru="37D|
|\def\upbracefill{$\m@th|\parbreak%
| \bracelu\leaders\vrule\hfill\bracerd|\parbreak%
| \braceld\leaders\vrule\hfill\braceru$}|
|\def\downbracefill{$\m@th|\parbreak%
| \braceld\leaders\vrule\hfill\braceru|\parbreak%
| \bracelu\leaders\vrule\hfill\bracerd$}|
\endlines
The ↑|\upbracefill| and ↑|\downbracefill| macros have restricted usage:
they must appear {\sl all by themselves\/} in an hbox or an alignment entry,
except for horizontal spacing.
\smallbreak
Finally, the fifth section of |plain.tex| closes by defining ↑|\bye|:
\beginlines
↑|\outer||\def\bye{\par\vfill\supereject\end} % the recommended way to stop|
\endlines
\subsection Macros for math. The sixth section of |plain.tex| is the
longest; but it will suffice to give only excerpts here, because most
of it is simply a tedious listing of special symbols together with their
font locations, and the same information appears in Appendix~F.
Some rudimentary things come first: The control sequences ↑|\sp| and ↑|\sb|
are provided for people who can't easily type |↑| and |_|; there are
four control symbols that provide spacing corrections; a ``↑{discretionary
times sign}'' ↑|\*| is defined; and then there's an interesting set of
macros that convert |f'''| into |f↑{\prime\prime\prime}|:
\beginlines
|\let\sp=↑ \let\sb=_|
|\def|↑|\,||{\mskip\thinmuskip} \def|↑|\!||{\mskip-\thinmuskip}|\parbreak%
|\def|↑|\>||{\mskip\medmuskip} \def|↑|\;||{\mskip\thickmuskip}|
|\def\*{\discretionary{\thinspace|\parbreak%
| \edef\next{\the\textfont2}\next\char2}{}{}}|
|{\catcode`\↑↑Z=\active \gdef↑↑Z{\not=}} % ↑↑Z is like \ne in math|
|{\catcode`\'=\active \gdef'{↑\bgroup\prim@s}}|\parbreak%
|\def\prim@s{\prime\futurelet\next\pr@m@s}|\parbreak%
|\def\pr@m@s{\ifx'\next \let\next=\pr@@@s|%
| \else\let\next=\egroup\fi \next}|\parbreak%
|\def\pr@@@s#1{\prim@s}|
\endlines
The next job is to define ↑{Greek letters} and other symbols of type ↑{Ord}.
Uppercase Greek letters are assigned hexadecimal codes of the form \hex{7xxx},
so that they will change families when ↑|\fam| changes.
Three dots `$\,\cdots\,$' are used here and below to indicate that
additional symbols, having similar definitions, are listed in Appendix~F.
\beginlines
|\mathchardef|↑|\alpha||="010B|\qquad$\cdots$\qquad|\mathchardef\omega="0121|
|\mathchardef|↑|\Gamma||="7000|\qquad$\cdots$\qquad|\mathchardef\Omega="700A|
|\mathchardef|↑|\aleph||="0240|\qquad$\cdots$\qquad%
|\mathchardef\spadesuit="027F|
|\def|↑|\hbar||{{\mathchar'26\mskip-9muh}}|
|\def|↑|\surd||{{\mathchar"1270}}|
|\def|↑|\angle||{{\vbox{\ialign{$\m@th\scriptstyle##$\cr|\parbreak%
| \not\mathrel{\mkern14mu}\cr \noalign{\nointerlineskip}|\parbreak%
| \mkern2.5mu\leaders\hrule height.34pt\hfill\mkern2.5mu\cr}}}}|
\endlines
Large operators are assigned hexadecimal codes of the form \hex{1xxx}:
\beginlines
|\mathchardef\smallint="1273|
|\mathchardef|↑|\sum||="1350|\qquad$\cdots$\qquad|\mathchardef\biguplus="1355|
|\mathchardef\intop="1352 \def|↑|\int||{\intop\nolimits}|
|\mathchardef\ointop="1348 \def\oint{\ointop\nolimits}|
\endlines
Integral signs get special treatment so that their limits won't be set
above and below.
\smallskip
Binary operations are next; nothing exciting here.
\beginlines
|\mathchardef\pm="2206|\qquad$\cdots$\qquad|\mathchardef\amalg="2271|
\endlines
Relations are also fairly straightforward, except for the ones that are
constructed from other characters. The ↑|\mapstochar| is a character
`$\mapstochar\mskip5mu$' of width zero that is quite useless by itself,
but it combines with right arrows to make ↑|\mapsto| `$\mapsto$' and
↑|\longmapsto| `$\longmapsto$'. Similarly, ↑|\not| is a relation character of
width zero that puts a slash over the character that follows. When two
relations are adjacent in a math formula, \TeX\ puts no space between them.
\beginlines
|\mathchardef\leq="3214|\qquad$\cdots$\qquad|\mathchardef\perp="323F|
|\def|↑|\joinrel||{\mathrel{\mkern-3mu}}|
|\def|↑|\relbar||{\mathrel{\smash-}} \def|↑|\Relbar||{\mathrel=}|
|\def|↑|\longrightarrow||{\relbar\joinrel\rightarrow}|\parbreak%
|\def|↑|\Longrightarrow||{\Relbar\joinrel\Rightarrow}|
|\def|↑|\longleftarrow||{\leftarrow\joinrel\relbar}|\parbreak%
|\def|↑|\Longleftarrow||{\Leftarrow\joinrel\Relbar}|
|\def|↑|\longleftrightarrow||{\leftarrow\joinrel\rightarrow}|\parbreak%
|\def|↑|\Longleftrightarrow||{\Leftarrow\joinrel\Rightarrow}|
|\mathchardef\mapstochar="322F \def\mapsto{\mapstochar\rightarrow}|\parbreak%
|\def\longmapsto{\mapstochar\longrightarrow}|
|\mathchardef\lhook="312C \def|↑|\hookrightarrow||{\lhook\joinrel\rightarrow}|
|\mathchardef\rhook="312D \def|↑|\hookleftarrow||{\leftarrow\joinrel\rhook}|
\smallbreak
|\def|↑|\neq||{\not=} \def|↑|\models||{\mathrel|\||\joinrel=}|
|\def|↑|\bowtie||{\mathrel\triangleright\joinrel\mathrel\triangleleft}|
\weakendlines
After defining characters ↑|\ldotp| and ↑|\cdotp| that act as math
punctuation, it is easy to define ↑|\ldots| and ↑|\cdots| macros that
\vadjust{\penalty-50} % fairly good breakpoint (on July 27, 1983)
give the proper spacing in most circumstances. Vertical and diagonal
dots (↑|\vdots| and ↑|\ddots|) are also provided here:
\beginlines
|\mathchardef\colon="603A % colon as a punctuation mark|
|\mathchardef\ldotp="602E \mathchardef\cdotp="6201|
|\def\ldots{\mathinner{\ldotp\ldotp\ldotp}}|
|\def\cdots{\mathinner{\cdotp\cdotp\cdotp}}|
|\def\vdots{\vbox{\baselineskip 4pt \kern6pt \hbox{.}\hbox{.}\hbox{.}}}|
|\def\ddots{\mathinner{\mskip1mu\raise7pt\vbox{\kern7pt\hbox{.}}\mskip2mu|
| \raise4pt\hbox{.}\mskip2mu\raise1pt\hbox{.}\mskip1mu}}|
\endlines
Most of the math accents are handled entirely by the ↑|\mathaccent|
primitive, but a few of the variable-width ones are constructed the
hard way:
\beginlines
|\def\acute{\mathaccent"7013 }|\qquad$\cdots$\qquad%
|\def\ddot{\mathaccent"707F }|
|\def|↑|\widetilde||{\mathaccent"0365 } \def|↑|\widehat||{\mathaccent"0362 }|
|\def|↑|\overrightarrow||#1{\vbox{\ialign{##\crcr|\parbreak%
| \rightarrowfill\crcr\noalign{\kern-1pt\nointerlineskip}|\parbreak%
| $\hfil\displaystyle{#1}\hfil$\crcr}}}|
|\def|↑|\overleftarrow||#1{\vbox{\ialign{##\crcr|\parbreak%
| \leftarrowfill\crcr\noalign{\kern-1pt\nointerlineskip}|\parbreak%
| $\hfil\displaystyle{#1}\hfil$\crcr}}}|
|\def|↑|\overbrace|%
|#1{\mathop{\vbox{\ialign{##\crcr\noalign{\kern3pt}|\parbreak%
| \downbracefill\crcr\noalign{\kern3pt\nointerlineskip}|\parbreak%
| $\hfil\displaystyle{#1}\hfil$\crcr}}}}|
|\def|↑|\underbrace||#1{\mathop{\vtop{\ialign{##\crcr|\parbreak%
| $\hfil\displaystyle{#1}\hfil$\crcr|%
|\noalign{\kern3pt\nointerlineskip}|\parbreak%
| \upbracefill\crcr\noalign{\kern3pt}}}}}|
|\def|↑|\skew||#1#2#3{{#2{#3\mkern#1mu}\mkern-#1mu}{}}|
\endlines
Now we come to 24 delimiters that can change their size: ↑↑|\delimiter|
\beginlines
|\def\langle{\delimiter"426830A } \def\rangle{\delimiter"526930B }|
|\def\lbrace{\delimiter"4266308 } \def\rbrace{\delimiter"5267309 }|
|\def\lceil{\delimiter"4264306 } \def\rceil{\delimiter"5265307 }|
|\def\lfloor{\delimiter"4262304 } \def\rfloor{\delimiter"5263305 }|
|\def\lgroup{\delimiter"400033A } \def\rgroup{\delimiter"500033B }|
|\def\lmoustache{\delimiter"4000340 } \def\rmoustache{\delimiter"5000341 }|%
\kern-2pt
|\def\uparrow{\delimiter"3222378 } \def\Uparrow{\delimiter"322A37E }|
|\def\downarrow{\delimiter"3223379 } \def\Downarrow{\delimiter"322B37F }|
|\def\updownarrow{\delimiter"326C33F } \def\arrowvert{\delimiter"000033C }|
|\def\Updownarrow{\delimiter"326D377 } \def\Arrowvert{\delimiter"000033D } |
|\def\vert{\delimiter"026A30C } \def\Vert{\delimiter"026B30D } |
|\def\backslash{\delimiter"020430F } \def\bracevert{\delimiter"000033E }|
\endlines
The `↑|\big||...|↑|\Bigg|' macros produce specific sizes: ↑↑|\Big|↑↑|\bigg|
\beginlines
|\def\bigl{\mathopen\big} \def\bigm{\mathrel\big} \def\bigr{\mathclose\big}|
|\def\Bigl{\mathopen\Big} \def\Bigm{\mathrel\Big} \def\Bigr{\mathclose\Big}|
|\def\biggl{\mathopen\bigg} \def\Biggl{\mathopen\Bigg}|
|\def\biggm{\mathrel\bigg} \def\Biggm{\mathrel\Bigg}|
|\def\biggr{\mathclose\bigg} \def\Biggr{\mathclose\Bigg}|
|\def\big#1{{\hbox{$\left#1\vbox to 8.5pt{}\right.\n@space$}}}|
|\def\Big#1{{\hbox{$\left#1\vbox to 11.5pt{}\right.\n@space$}}}|
|\def\bigg#1{{\hbox{$\left#1\vbox to 14.5pt{}\right.\n@space$}}}|
|\def\Bigg#1{{\hbox{$\left#1\vbox to 17.5pt{}\right.\n@space$}}}|
|\def\n@space{\nulldelimiterspace=0pt \m@th}|
\endlines
There are a few other simple abbreviations related to delimiters:
\beginlines
|\def|↑|\choose||{\atopwithdelims()}|
|\def|↑|\brack||{\atopwithdelims[]}|
|\def|↑|\brace||{\atopwithdelims\{\}}|
|\def|↑|\sqrt||{\radical"270370 }|
\endlines
And now we come to something more interesting. The ↑|\mathpalette| operation
constructs a formula in all four styles; it is applied here in the
implementation of\/ ↑|\phantom|, ↑|\smash|, ↑|\root|, and other
operations.
\beginlines
|\def\mathpalette#1#2{\mathchoice{#1\displaystyle{#2}}|\parbreak%
| {#1\textstyle{#2}}{#1\scriptstyle{#2}}{#1\scriptscriptstyle{#2}}}|
\smallbreak
|\newbox\rootbox|
|\def\root#1\of{\setbox\rootbox=|\parbreak%
| \hbox{$\m@th \scriptscriptstyle{#1}$}|\parbreak%
| \mathpalette\r@@t}|
|\def\r@@t#1#2{\setbox0=\hbox{$\m@th #1\sqrt{#2}$}|\parbreak%
| \dimen@=\ht0 \advance\dimen@ by-\dp0|\parbreak%
| \mskip5mu \raise.6\dimen@\copy\rootbox \mskip-10mu \box0}|
\smallbreak
|\newif\ifv@ \newif\ifh@|
|\def|↑|\vphantom||{\v@true\h@false\ph@nt}|
|\def|↑|\hphantom||{\v@false\h@true\ph@nt}|
|\def\phantom{\v@true\h@true\ph@nt}|
|\def\ph@nt{\ifmmode\def\next{\mathpalette\mathph@nt}%|\parbreak%
| \else\let\next=\makeph@nt\fi \next}|
|\def\makeph@nt#1{\setbox0=\hbox{#1}\finph@nt}|
|\def\mathph@nt#1#2{\setbox0=\hbox{$\m@th#1{#2}$}\finph@nt}|
|\def\finph@nt{\setbox2=\null \ifv@ \ht2=\ht0 \dp2=\dp0 \fi|\parbreak%
| \ifh@ \wd2=\wd0 \fi \box2 }|
|\def\mathstrut{\vphantom(}|
\smallbreak
|\def\smash{\relax % \relax, in case this comes first in \halign|\parbreak%
| \ifmmode\def\next{\mathpalette\mathsm@sh}\else\let\next\makesm@sh|\parbreak%
| \fi \next}|
|\def\makesm@sh#1{\setbox0=\hbox{#1}\finsm@sh}|
|\def\mathsm@sh#1#2{\setbox0=\hbox{$\m@th#1{#2}$}\finsm@sh}|
|\def\finsm@sh{\ht0=0pt \dp0=0pt \box0 }|
\smallbreak
|\def|↑|\cong||{\mathrel{\mathpalette\@vereq\sim}} % \sim over =|\parbreak%
|\def\@vereq#1#2{\lower.5pt\vbox{\baselineskip0pt \lineskip-.5pt|\parbreak%
| \ialign{$\m@th#1\hfil##\hfil$\crcr#2\crcr=\crcr}}}|
|\def|↑|\notin||{\mathrel{\mathpalette\c@ncel\in}}|\parbreak%
|\def\c@ncel#1#2{\ooalign{$\hfil#1\mkern1mu/\hfil$\crcr$#1#2$}}|\parbreak%
|\def|↑|\rightleftharpoons||{\mathrel{\mathpalette\rlh@{}}}|\parbreak%
|\def\rlh@#1{\vcenter{\hbox{\ooalign{\raise2pt|\parbreak%
| \hbox{$#1\rightharpoonup$}\crcr $#1\leftharpoondown$}}}}|
|\def|↑|\buildrel||#1\over#2{\mathrel{\mathop{#2}\limits↑{#1}}}|
|\def|↑|\doteq||{\buildrel\textstyle.\over=}|
\endlines
These definitions illustrate how other built-up
symbol combinations could be defined to work in all four styles.
Alternate names are defined now:
\beginlines
|\let|↑|\ne||=\neq \let|↑|\le||=\leq \let|↑|\ge||=\geq|
↑↑{esc vert}↑↑{esc lbrace}↑↑{esc rbrace}%
|\let\{=\lbrace \let\|\||=\Vert \let\}=\rbrace|
|\let|↑|\to||=\rightarrow \let|↑|\gets||=\leftarrow \let|↑|\owns||=\ni|
|\let|↑|\land||=\wedge \let|↑|\lor||=\vee \let|↑|\lnot||=\neg|
|\def|↑|\iff||{\;\Longleftrightarrow\;}|
\endlines
The 32 common functions whose names generally appear in roman letters are listed
in Chapter~18. Only a few of the definitions need to be shown here:
↑↑|\arccos| ↑↑|\cos| ↑↑|\csc| ↑↑|\exp| ↑↑|\ker| ↑↑|\limsup| ↑↑|\min|
↑↑|\sinh| ↑↑|\arcsin| ↑↑|\cosh| ↑↑|\deg| ↑↑|\gcd| ↑↑|\lg| ↑↑|\ln| ↑↑|\Pr|
↑↑|\sup| ↑↑|\arctan| ↑↑|\cot| ↑↑|\det| ↑↑|\hom| ↑↑|\lim| ↑↑|\log| ↑↑|\sec|
↑↑|\tan| ↑↑|\arg| ↑↑|\coth| ↑↑|\dim| ↑↑|\inf| ↑↑|\liminf| ↑↑|\max|
↑↑|\sin| ↑↑|\tanh|
\beginlines
|\def\arccos{|↑|\mathop||{\rm arccos}|↑|\nolimits||}|
\hskip100pt$\cdots$\qquad|\def\tanh{|↑|\mathop||{\rm tanh}|↑|\nolimits||}|
|\def\det{\mathop{\rm det}}|\qquad$\cdots$\qquad|\def\sup{\mathop{\rm sup}}|
|\def\liminf{\mathop{\rm lim\,inf}} \def\limsup{\mathop{\rm lim\,sup}}|
\smallskip
|\def|↑|\bmod||{\mskip-\medmuskip \mskip5mu|\parbreak%
| |↑|\mathbin||{\rm mod} \penalty900 \mskip5mu \mskip-\medmuskip}|
|\def|↑|\pmod||#1{\allowbreak \mkern18mu ({\rm mod}\,\,#1)}|
\endlines
The definition of\/ ↑|\matrix| goes to some pains to ensure that two
$n$-rowed matrices will have the same height and the same depth, unless
at least one of their rows is unusually big. The definition of
↑|\bordermatrix| is even more complicated, but it seems to work
reasonably well; it uses a constant ↑|\p@renwd| that represents the
width of a big extensible left parenthesis.
\beginlines
|\def\matrix#1{\,|↑|\vcenter||{\normalbaselines\m@th|\parbreak%
| \ialign{\hfil$##$\hfil&&\quad\hfil$##$\hfil\crcr|\parbreak%
| \mathstrut\crcr\noalign{\kern-\baselineskip}|\parbreak%
| #1\crcr\mathstrut\crcr\noalign{\kern-\baselineskip}}}\,}|
\smallbreak
|\newdimen\p@renwd \setbox0=\hbox{\tenex B} \p@renwd=\wd0|
|\def\bordermatrix#1{\begingroup \m@th|\parbreak%
| \setbox0=\vbox{\def\cr|%
|{\crcr\noalign{\kern2pt\global\let\cr=\endline}}|\parbreak%
| \ialign{$##$\hfil\kern2pt\kern\p@renwd|%
|&\thinspace\hfil$##$\hfil|\parbreak%
| &&\quad\hfil$##$\hfil\crcr|\parbreak%
| \omit\strut\hfil\crcr\noalign{\kern-\baselineskip}|\parbreak%
| #1\crcr\omit\strut\cr}}|\parbreak%
| \setbox2=\vbox{\unvcopy0 \global\setbox1=\lastbox}|\parbreak%
| \setbox2=\hbox{\unhbox1 \unskip \global\setbox1=\lastbox}|\parbreak%
| \setbox2=\hbox{$\kern\wd1\kern-\p@renwd \left( \kern-\wd1|\parbreak%
| \global\setbox1=\vbox{\box1\kern2pt}|\parbreak%
| \vcenter{\kern-\ht1 \unvbox0 \kern-\baselineskip} \,\right)$}|\parbreak%
| \;\vbox{\kern\ht1\box2}\endgroup}|
\endlines
The next macros are much simpler:
\beginlines
|\def|↑|\cases||#1{\left\{\,\vcenter{\normalbaselines\m@th|\parbreak%
| \ialign{$##\hfil$&\quad##\hfil\crcr#1\crcr}}\right.}|
|\def|↑|\pmatrix||#1{\left( \matrix{#1} \right)}|
\endlines
Finally there are macros for displayed equations:
\beginlines
|\def|↑|\openup||{\afterassignment\@penup\dimen@=}|\parbreak%
|\def\@penup{\advance\lineskip\dimen@|\parbreak%
| \advance\baselineskip\dimen@ \advance\lineskiplimit\dimen@}|
|\def|↑|\eqalign||#1{\,\vcenter{\openup1\jot \m@th|\parbreak%
| \ialign{\strut\hfil$\displaystyle{##}$&$\displaystyle{{}##}$\hfil|\parbreak%
| \crcr#1\crcr}}\,}|
\smallbreak
|\newif\ifdt@p|
|\def\displ@y{\global\dt@ptrue \openup1\jot \m@th|\parbreak%
| |↑|\everycr||{\noalign{\ifdt@p \global\dt@pfalse|\parbreak%
| \vskip-\lineskiplimit \vskip\normallineskiplimit|\parbreak%
| \else \penalty|↑|\interdisplaylinepenalty|| \fi}}}|
|\def|↑|\displaylines||#1{\displ@y|\parbreak%
| \halign{\hbox to\displaywidth{$\hfil\displaystyle##\hfil$}\crcr|\parbreak%
| #1\crcr}}|
\smallbreak
|\def|↑|\eqalignno||#1{\displ@y \tabskip=|↑|\centering|\parbreak%
| \halign to\displaywidth{\hfil$\displaystyle{##}$\tabskip=0pt|\parbreak%
| &$\displaystyle{{}##}$\hfil\tabskip=\centering|\parbreak%
| &\llap{$##$}\tabskip=0pt\crcr|\parbreak%
| #1\crcr}}|
|\def|↑|\leqalignno||#1{\displ@y \tabskip=\centering|\parbreak%
| \halign to\displaywidth{\hfil$\displaystyle{##}$\tabskip=0pt|\parbreak%
| &$\displaystyle{{}##}$\hfil\tabskip=\centering|\parbreak%
| &\kern-\displaywidth\rlap{$##$}\tabskip=\displaywidth\crcr|\parbreak%
| #1\crcr}}|
\endlines
The value of\/ |\lineskiplimit| is assumed to be |\normallineskiplimit|
plus the accumulated amount of ``opening up.'' Thus, the |\vskip|
instructions in |\displ@y| will compensate for the fact that the
first baseline of an alignment is separated by an opened-up baselineskip
from the last line preceding the display.
\subsection Macros for output. The |plain.tex| file also contains the output
routine described in Chapters 15 and~23. First there are simple
facilities related to page numbers, headings, and footings:
\beginlines
|\countdef|↑|\pageno||=0 \pageno=1 % first page is number 1|
|\newtoks|↑|\headline|| \headline={\hfil} % headline is normally blank|
|\newtoks|↑|\footline|| \footline={\hss\tenrm\folio\hss}|\parbreak%
| % footline is normally a centered page number in font \tenrm|
|\def|↑|\folio||{\ifnum\pageno<0 \romannumeral-\pageno \else\number\pageno \fi}|
|\def|↑|\nopagenumbers||{\footline={\hfil}} % blank out the footline|
|\def|↑|\advancepageno||{\ifnum\pageno<0 \global\advance\pageno by -1|\parbreak%
| \else\global\advance\pageno by 1 \fi} % increase |\||pageno|\|
\smallbreak
|\newif\ifr@ggedbottom|
|\def|↑|\raggedbottom||{\topskip10pt plus60pt \r@ggedbottomtrue}|
|\def|↑|\normalbottom||{\topskip10pt \r@ggedbottomfalse} % undoes \raggedbottom|
\endlines
The ↑|\footnote| macro has a few subtle features that can best be appreciated
by someone who reads Chapter~15 very carefully. It also uses some
↑|\bgroup| and ↑|\futurelet| and ↑|\aftergroup| trickery, so that the footnote
text does not need to be a ↑{parameter} to |\vfootnote|:
\beginlines
↑|\newinsert||\footins|
|\def\footnote#1{\let\@sf=\empty|\parbreak%
| \ifhmode\edef\@sf{\spacefactor=\the\spacefactor}\fi|\parbreak%
| #1\@sf\vfootnote{#1}}|
|\def|↑|\vfootnote||#1{\insert\footins\bgroup|\parbreak%
| \interlinepenalty=\interfootnotelinepenalty|\parbreak%
| \splittopskip=\ht\strutbox % top baseline for broken footnotes|\parbreak%
| \splitmaxdepth=\dp\strutbox \floatingpenalty=20000|\parbreak%
| \leftskip=0pt \rightskip=0pt \spaceskip=0pt \xspaceskip=0pt|\parbreak%
| \textindent{#1}\footstrut\futurelet\next\fo@t}|
|\def\fo@t{\ifcat\bgroup\noexpand\next \let\next\f@@t|\parbreak%
| \else\let\next\f@t\fi \next}|
|\def\f@@t{\bgroup\aftergroup\@foot\let\next}|
|\def\f@t#1{#1\@foot}|
|\def\@foot{\strut\egroup}|
|\def\footstrut{\vbox to\splittopskip{}}|
|\skip\footins=\bigskipamount % space added when footnote is present|
|\count\footins=1000 % footnote magnification factor (1 to 1)|
|\dimen\footins=8in % maximum footnotes per page|
\endlines
↑{Floating insertions} are handled by doing an ↑|\insert| whose
vertical list consists of a penalty item followed by a single box:
\beginlines
|\newinsert\topins \newif\ifp@ge \newif\if@mid|
|\def|↑|\topinsert||{\@midfalse\p@gefalse\@ins}|
|\def|↑|\midinsert||{\@midtrue\@ins}|
|\def|↑|\pageinsert||{\@midfalse\p@getrue\@ins}|
|\skip\topins=0pt % no space added when a topinsert is present|
|\count\topins=1000 % magnification factor (1 to 1)|
|\dimen\topins=\maxdimen % no limit per page|
|\def\@ins{\par\begingroup\setbox0=\vbox\bgroup} % start a \vbox|
|\def\endinsert{\egroup % finish the \vbox|\parbreak%
| \if@mid \dimen@=\ht0 \advance\dimen@ by\dp0|\parbreak%
| \advance\dimen@ by12\p@ \advance\dimen@ by\pagetotal|\parbreak%
| \ifdim\dimen@>\pagegoal \@midfalse\p@gefalse\fi\fi|\parbreak%
| \if@mid \bigskip \box0 \bigbreak|\parbreak%
| \else\insert\topins{\penalty100 % floating insertion|\parbreak%
| |↑|\splittopskip||=0pt |↑|\splitmaxdepth||=\maxdimen |%
↑|\floatingpenalty||=0|\parbreak%
| \ifp@ge \dimen@=\dp0|\parbreak%
| \vbox to\vsize{\unvbox0 \kern-\dimen@} % depth is zero|\parbreak%
| \else \box0 \nobreak\bigskip\fi}\fi\endgroup}|
\endlines
Most of the ↑|\output| routine appears in Chapter 23; it is given here
in full:
\beginlines
|\output={\plainoutput}|
|\def|↑|\plainoutput|%
|{\shipout\vbox{\makeheadline\pagebody\makefootline}|\parbreak%
| \advancepageno|\parbreak%
| \ifnum\outputpenalty>-20000 \else\dosupereject\fi}|
|\def|↑|\pagebody||{\vbox to\vsize{\boxmaxdepth=\maxdepth \pagecontents}}|
|\def|↑|\makeheadline||{\vbox to 0pt{\vskip-22.5pt|\parbreak%
| \line{\vbox to8.5pt{}\the\headline}\vss}\nointerlineskip}|
|\def|↑|\makefootline||{\baselineskip=24pt \line{\the\footline}}|
|\def|↑|\dosupereject|%
|{\ifnum\insertpenalties>0 % something is being held over|\parbreak%
| \vbox to-\topskip{\line{}\vss}\vfill\supereject\fi}|
\smallbreak
|\def|↑|\pagecontents||{\ifvoid\topins\else\unvbox\topins\fi|\parbreak%
| \dimen@=\dp255 \unvbox255|\parbreak%
| \ifvoid\footins\else % footnote info is present|\parbreak%
| \vskip\skip\footins \footnoterule \unvbox\footins\fi|\parbreak%
| \ifr@ggedbottom \kern-\dimen@ \vfil \fi}|
|\def|↑|\footnoterule||{\kern-3pt|\parbreak%
| \hrule width 2truein \kern 2.6pt} % the \hrule is .4pt high|
\endlines
\subsection Hyphenation and everything else. The last part of |plain.tex|
reads the hyphenation patterns and exceptions found on file ↑|hyphen.tex|
(see Appendix~H\null); then it defines a few miscellaneous macros, sets
up ↑|\rm| type, and that's all!
\beginlines
|\input hyphen % the hyphenation patterns and exceptions|
\nobreak\smallskip
|\def|↑|\magnification||{|↑|\afterassignment||\m@g\count@}|
|\def\m@g{\mag=\count@|\parbreak%
| \hsize6.5truein\vsize8.9truein\dimen\footins8truein}|
\smallbreak
|\def|↑|\tracingall|%
|{\tracingonline=1 \tracingcommands=2 \tracingstats=2|\parbreak%
| \tracingpages=1 \tracingoutput=1 \tracinglostchars=1 |\parbreak%
| \tracingmacros=1 \tracingparagraphs=1 \tracingrestores=1 |\parbreak%
| \showboxbreadth=\maxdimen \showboxdepth=\maxdimen \errorstopmode}|
\smallbreak
|\def|↑|\showhyphens|%
|#1{\setbox0=\vbox{\parfillskip0pt \hsize=\maxdimen \tenrm|\parbreak%
| \pretolerance=-1 \tolerance=-1 \hbadness=0 \showboxdepth=0 \ #1}}|
\smallbreak
|\normalbaselines\rm % select roman font|
|\nonfrenchspacing % punctuation affects the spacing|
|\catcode`@=12 % at signs are no longer letters|
\nobreak\smallskip
|\def|↑|\fmtname||{plain}\def\fmtversion{1.0} % identifies the current format|
\endlines
The format name and version number are recorded in control sequences,
in order to help the people who might have to explain why something
doesn't work. Macro files like |plain.tex| should not be changed in any way,
except with respect to preloaded fonts, unless the changes are authorized
by the author of the macros.
\endchapter
The purpose of a programming system is to make a computer easy to use.
To do this, it furnishes languages and various facilities
that are in fact programs invoked and controlled by language features.
But these facilities are bought at a price:
the external description of a programming system is ten to twenty times
as large as the external description of the computer system itself.
The user finds it far easier to specify any particular function,
but there are far more to choose from,
and far more options and formats to remember.
\author FREDERICK P. ↑{BROOKS}, JR., {\sl The Mythical Man Month\/} (1975)
% p 43
\bigskip
When someone says, ``I want a programming language
in which I need only say what I wish done,''
give him a lollipop.
\author ALAN ↑{PERLIS}, {\sl Epigrams on Programming\/} (1982)
% SIGPLAN Notices 17,9 (September 82), 7--13.
% There are many more, like "Editing is a rewording activity."
\eject
\beginchapter Chapter 24. Summary of\\Vertical\\Mode
↑↑{vertical mode}
The whole \TeX\ language has been presented in the previous chapters;
we have finally reached the end of our journey into previously
uncharted territory. Hurray! Victory! Now it is time to take a more
systematic look at what we have encountered: to consider the facts in an
orderly manner, rather than to mix them up with informal examples and
applications as we have been doing. A child learns to speak a language
before learning formal rules of grammar, but the rules of grammar come
in handy later on when the child reaches adulthood. The purpose of
this chapter---and of the two chapters that follow---is to present a
precise and concise summary of the language that \TeX\ understands, so
that mature users will be able to communicate as effectively as possible
with the machine.
We will be concerned in these chapters solely with \TeX's {\sl↑{primitive}\/}
operations, rather than with the higher level features of plain \TeX\ format
that most people deal with. Therefore novice users should put off reading
Chapters 24--26 until they feel a need to know what goes on inside the
computer. Appendix~B contains a summary of plain \TeX, together with a
ready-reference guide to the things that most people want to know about
\TeX\ usage. The best way to get an overview of \TeX\ from a high level
is to turn to the opening pages of Appendix~B.
\medskip\ninepoint
Our purpose here, however, is to survey the low-level parts of \TeX\ on
which higher level superstructures have been built, in order to provide
a detailed reference for people who do need to know the details.
The remainder of this chapter is set in small type, like that of the
present paragraph, since it is analogous to material that is marked
``doubly dangerous'' in other chapters. Instead of using dangerous bend
signs repeatedly, let us simply agree that Chapters 24--26 are dangerous
by definition.
\medbreak
\TeX\ actually has a few features that didn't seem to be worth mentioning
in previous chapters, so they will be introduced here as part of our
complete survey. If there is any disagreement between something that was
said previously and something that will be said below, the facts in the
present chapter and its successors should be regarded as better
approximations to the ↑{truth}.
\medbreak
We shall study \TeX's digestive processes, i.e., what \TeX\ does with
the lists of tokens that arrive in its ``stomach.'' Chapter~7 has
described the process by which input files are converted to lists of
tokens in \TeX's ``mouth,'' and Chapter~20 explained how expandable tokens
↑↑{anatomy of TeX}
are converted to unexpandable ones in \TeX's ``gullet'' by a process
similar to regurgitation. When unexpandable tokens finally reach \TeX's
gastro-intestinal tract, the real activity of typesetting begins, and
that is what we are going to survey in these summary chapters.
Each token that arrives in \TeX's tummy is considered to be a {\sl↑{command}\/}
that the computer will obey. For example, the letter `{\tt L}' is a command
to typeset an `L' in the current font; `|\par|' tells \TeX\ to
finish a paragraph. \TeX\ is always in one of six modes, as
described in Chapter~13, and a command sometimes means different things
in different modes. The present chapter is about vertical mode (and
internal vertical mode, which is almost the same): We shall
discuss \TeX's response to every primitive command, when that command occurs
in vertical mode. Chapters 25 and~26 characterize horizontal mode and math mode
in a similar way, but those chapters are shorter than this one because
many commands have the same behavior in all modes; the rules for such
commands will not be repeated thrice, they will appear only once.
Some commands have ↑{arguments}. In other words, one or more of the tokens
that follow a command might be used to modify that command's behavior,
and those tokens are not considered to be commands themselves. For example,
when \TeX\ processes the sequence of tokens that corresponds to
`|\dimen2=2.5pt|', it considers only the first token `|\dimen|' to be a
command; the next tokens are swept up as part of the operation, because \TeX\
needs to know what |\dimen| register is to be set equal to what \<dimen> value.
We shall define \TeX's parts of speech by using a modified form of the
grammatical notation that was introduced about 1960 by John ↑{Backus} and
Peter ↑{Naur} for the definition of computer languages. Quantities in
↑{angle brackets} will either be explained in words or they will be defined
by {\sl↑{syntax rules}\/} that show exactly how they are formed from other
quantities. For example,
\beginsyntax
<unit of measure>\is<optional spaces><internal unit>
\alt<optional {\tt true}><physical unit>
\endsyntax
defines a \<unit of measure> to be either an occurrence of
\<optional spaces> followed by an \<internal unit>, or \<optional {\tt true}>
followed by \<physical unit>. The symbol `\is' in a syntax rule
means ``is defined to be,'' and `\alt' means ``or.''
Sometimes a syntax rule is ↑{recursive}, in the sense that the right-hand
side of the definition involves the quantity being defined. For example,
the rule
\beginsyntax
<optional spaces>\is<empty>\alt<space token><optional spaces>
\endsyntax
defines the grammatical quantity called \<optional spaces> to be either
\<empty>, or a \<space token> followed by \<optional spaces>. The quantity
↑\<empty> stands for ``nothing,'' i.e., for no tokens at all; hence the
syntax rule just given is a formalized way of saying that \<optional
spaces> stands for a sequence of zero or more spaces.
The alternatives on the right-hand side of a syntax rule need not consist
entirely of quantities in angle brackets. Explicit tokens can be used
as well. For example, the rule
\beginsyntax
<plus or minus>\is|+|$_{12}$\alt|-|$_{12}$
\endsyntax
says that \<plus or minus> stands for a ↑{character token} that is either
a plus sign or a~minus sign, with category code~12.
We shall use a special convention for ↑{keywords}, since the actual syntax
of a keyword is somewhat technical. Letters in typewriter type like
`\[pt]' will stand for
\begindisplay
\<optional spaces>\<p or P>\<t or T>,
\enddisplay
where \<p or P> denotes any non-active character token for either |p| or~|P|
(independent of the category code), and where \<t or T> is similar.
When a control sequence like `|\dimen|' is used in the syntax rules below,
it stands for any token whose current meaning is the same as the meaning
that |\dimen| had when \TeX\ started up. Other tokens can be given this
same meaning, using |\let| or |\futurelet|, and the meaning of the
control sequence |\dimen| itself may be redefined by the user, but
the syntax rules take no note of this; they just use `|\dimen|'
as a way of referring to a particular primitive command of \TeX. \ (This
notation is to be distinguished from `\cstok{dimen}', which stands
for the control sequence token whose actual name is |dimen|; see
Chapter~7.) ↑↑{boxed words}
Control sequences sometimes masquerade as characters, if their meaning has
been assigned by |\let| or |\futurelet|. For example, Appendix~B says
\begintt
\let\bgroup={ \let\egroup=}
\endtt
and these commands make ↑|\bgroup| and ↑|\egroup| act somewhat like left
and right ↑{curly} ↑{braces}. Such control sequences are called ``↑{implicit
characters}''; they are interpreted in the same way as characters, when
\TeX\ acts on them as commands, but not always when they appear in
arguments to commands. For example, the command `|\let\plus=+|' does not
make |\plus| an acceptable substitute for the character token `|+|$_{12}$'
in the syntax rule for \<plus or minus> given above, nor does the command
`|\let\p=p|' make |\p| acceptable as part of the keyword \[pt]. When
\TeX's syntax allows both explicit and implicit characters, the rules
below will be careful to say so, explicitly.
The quantity ↑\<space token>, which was used in the syntax of \<optional
spaces> above, stands for an explicit or implicit space. In other words,
it denotes either a character token of category~10, or a control sequence
or active character whose current meaning has been made equal to such a
token by |\let| or |\futurelet|.
It will be convenient to use the symbols `|{|', `|}|', and `|$|' to stand
for any explicit or implicit character tokens of the respective categories
1, 2, and~3, whether or not the actual character codes are braces or dollar
signs. Thus, for example, plain~\TeX's |\bgroup| is an example of a `|{|',
and so are the tokens `|{|$_1$' and `|(|$_1$'; but `|{|$_{12}$' is not.
The last few paragraphs can be summarized by saying that the alternatives
on the right-hand sides of \TeX's formal syntax rules are made from one
or more of the following things: (1)~syntactic quantities like
\<optional spaces>; (2)~explicit character tokens like |+|$_{12}$;
(3)~keywords like \[pt]; or (4)~the special symbols |{|, |}|, |$|.
\medbreak
Let us begin our study of \TeX's syntax by discussing the precise meanings
of quantities like \<number>, \<dimen>, and \<glue> that occur frequently
as arguments to commands. The most important of these is \<number>,
which specifies an integer value. Here's exactly what a \<number> is:
\beginsyntax
<number>\is<optional signs><unsigned number>
<optional signs>\is<optional spaces>
\alt<optional signs><plus or minus><optional spaces>
<unsigned number>\is<normal integer>\alt<coerced integer>
<normal integer>\is<internal integer>
\alt<integer constant><one optional space>
\alt|'|$_{12}$<octal constant><one optional space>
\alt|"|$_{12}$<hexadecimal constant><one optional space>
\alt|`|$_{12}$<character token><one optional space>
<integer constant>\is<digit>\alt<digit><integer constant>
<octal constant>\is<octal digit>\alt<octal digit><octal constant>
<hexadecimal constant>\is<hex digit>\alt<hex digit><hexadecimal constant>
<octal digit>\is|0|$_{12}$\alt|1|$_{12}$\alt|2|$_{12}$\alt|3|$_{12}$\alt%
|4|$_{12}$\alt|5|$_{12}$\alt|6|$_{12}$\alt|7|$_{12}$
<digit>\is<octal digit>\alt|8|$_{12}$\alt|9|$_{12}$
<hex digit>\is<digit>\alt|A|$_{11}$\alt|B|$_{11}$\alt|C|$_{11}$\alt%
|D|$_{11}$\alt|E|$_{11}$\alt|F|$_{11}$
\alt|A|$_{12}$\alt|B|$_{12}$\alt|C|$_{12}$\alt%
|D|$_{12}$\alt|E|$_{12}$\alt|F|$_{12}$
<one optional space>\is<space token>\alt<empty>
<coerced integer>\is<internal dimen>\alt<internal glue>
\endsyntax
The value of a \<number> is the value of the corresponding \<unsigned number>,
times~$-1$ for every minus sign in the \<optional signs>.
An ↑{alphabetic constant} denotes the character code in a
↑\<character token>; \TeX\ does not expand this token, which should either
be a (character~code, category~code) pair, or an active character, or
a control sequence whose name consists of a single character.
\ (See Chapter~20 for a complete list of all situations in which \TeX\ does
not expand tokens.) \ An \<integer constant> must not be immediately followed by
a \<digit>; in other words, if several digits appear consecutively, they
are all considered to be part of the same \<integer constant>. A similar
remark applies to the quantities \<octal constant> and \<hexadecimal constant>.
The quantity ↑\<one optional space> is \<empty> only if it has to be;
i.e., \TeX\ looks for \<one optional space> by reading a token and backing
up if a \<space token> wasn't there.
\ddangerexercise Can you think of a reason why you might want `|A|$_{12}$'
to be a \<hex digit> even though the letter {\tt A} has category~11? \
(Don't worry if your answer is ``no.''\thinspace)
\answer If\/ |\cs| has been defined by ↑|\chardef| or ↑|\mathchardef|, \TeX\
uses ↑{hexadecimal notation} when it expands ↑|\meaning||\cs|, and it
assigns category~12 to each digit of the expansion. You might have an
application in which you want the last part of the expansion to be treated
as a \<number>. \ (This is admittedly an obscure reason.)
The definition of \<number> is now complete except for the three quantities
called \<internal integer>, \<internal dimen>, and \<internal glue>, which
will be explained later; they represent things like parameters and registers.
For example, |\count1| and |\tolerance| and |\hyphenchar\tenrm| are
internal integers; |\dimen10| and |\hsize| and |\fontdimen6\tenrm| are
internal dimensions; |\skip100| and |\baselineskip| and |\lastskip| are
internal glue values. An internal dimension can be ``coerced'' to be an
integer by assuming units of scaled points. For example, if\/ |\hsize=100pt|
↑↑{coerce <dimen> to <number>}
↑↑{coerce <glue> to <dimen>}
and if\/ |\hsize| is used in the context of a \<number>, it denotes the
integer value 6553600. Similarly, an internal glue value can be coerced to
be an integer by first coercing it to be a dimension (omitting the
stretchability and shrinkability), then coercing that dimension.
\smallskip
Let's turn now to the syntax for \<dimen>, and for \<mudimen> its cousin:
\beginsyntax
<dimen>\is<optional signs><unsigned dimen>
<unsigned dimen>\is<normal dimen>\alt<coerced dimen>
<coerced dimen>\is<internal glue>
<normal dimen>\is<internal dimen>\alt<factor><unit of measure>
<factor>\is<normal integer>\alt<decimal constant>
<decimal constant>\is|.|$_{12}$\alt|,|$_{12}$
\alt<digit><decimal constant>
\alt<decimal constant><digit>
<unit of measure>\is<optional spaces><internal unit>
\alt<optional {\tt true}><physical unit><one optional space>
<internal unit>\is[em]<one optional space>\alt[ex]<one optional space>
\alt<internal integer>\alt<internal dimen>\alt<internal glue>
<optional {\tt true}>\is[true]\alt<empty>
<physical unit>\is[pt]\alt[pc]\alt[in]\alt[bp]\alt[cm]\alt[mm]\alt[dd]\alt%
[cc]\alt[sp]\vadjust{\vskip 3pt minus 2pt}
<mudimen>\is<optional signs><unsigned mudimen>
<unsigned mudimen>\is<normal mudimen>\alt<coerced mudimen>
<coerced mudimen>\is<internal muglue>
<normal mudimen>\is<factor><mu unit>
<mu unit>\is<optional spaces><internal muglue>\alt[mu]<one optional space>
\endsyntax
When `|true|' is present, the factor is multiplied by~1000 and divided by
the ↑|\mag| parameter. Physical units are defined in Chapter~10; |mu| is
explained in Chapter~18.
\goodbreak
Encouraged by our success in mastering the precise syntax of the quantities
\<number>, \<dimen>, and \<mudimen>, let's tackle \<glue> and \<muglue>:
\beginsyntax
<glue>\is<optional signs><internal glue>
\alt<dimen><stretch><shrink>
<stretch>\is[plus]<dimen>\alt[plus]<fil dimen>\alt<optional spaces>
<shrink>\is[minus]<dimen>\alt[minus]<fil dimen>\alt<optional spaces>
<fil dimen>\is<optional signs><factor><fil unit><optional spaces>
<fil unit>\is[fil]\alt[fill]\alt[filll]
<muglue>\is<optional signs><internal muglue>
\alt<mudimen><mustretch><mushrink>
<mustretch>\is[plus]<mudimen>\alt[plus]<fil dimen>\alt<optional spaces>
<mushrink>\is[minus]<mudimen>\alt[minus]<fil dimen>\alt<optional spaces>
\endsyntax
\TeX\ makes a large number of internal quantities accessible so that a
format designer can influence \TeX's behavior. Here is a list of all
these quantities, except for the parameters (which will be listed later).
\beginsyntax
<internal integer>\is<integer parameter>\alt<special integer>\alt↑|\lastpenalty|
\alt<countdef token>\alt↑|\count|<8-bit number>
\alt<chardef token>\alt<mathchardef token>
\alt↑|\hyphenchar|<font>\alt↑|\skewchar|<font>
\alt<codename><7-bit number>\alt↑|\parshape|
<special integer>\is↑|\spacefactor|\alt↑|\prevgraf|
\alt↑|\deadcycles|\alt↑|\insertpenalties|
<codename>\is↑|\catcode|\alt↑|\mathcode|
\alt↑|\lccode|\alt↑|\uccode|\alt↑|\sfcode|\alt↑|\delcode|
<font>\is<fontdef token>\alt↑|\font|\alt<family member>
<family member>\is<font range><4-bit number>
<font range>\is↑|\textfont|\alt↑|\scriptfont|\alt↑|\scriptscriptfont|
<internal dimen>\is<dimen parameter>\alt<special dimen>\alt↑|\lastkern|
\alt<dimendef token>\alt↑|\dimen|<8-bit number>
\alt↑|\fontdimen|<number><font>
\alt<box dimension><8-bit number>
<special dimen>\is↑|\prevdepth|\alt↑|\pagegoal|\alt↑|\pagetotal|
\alt↑|\pagestretch|\alt↑|\pagefilstretch|\alt↑|\pagefillstretch|
\alt↑|\pagefilllstretch|\alt↑|\pageshrink|\alt↑|\pagedepth|
<box dimension>\is↑|\ht|\alt↑|\wd|\alt↑|\dp|
<internal glue>\is<glue parameter>\alt↑|\lastskip|
\alt<skipdef token>\alt↑|\skip|<8-bit number>
<internal muglue>\is<muglue parameter>\alt↑|\lastskip|
\alt<muskipdef token>\alt↑|\muskip|<8-bit number>
\endsyntax
A ↑\<countdef token> is a control sequence token in which the control
sequence's current meaning has been defined by ↑|\countdef|; the other
quantities ↑\<dimendef token>, ↑\<skipdef token>, ↑\<muskipdef token>,
↑\<chardef token>, ↑\<mathchardef token>, and $\langle$toksdef
token$\rangle$ ↑↑\<toksdef token> are defined similarly. A \<fontdef
token> refers to a definition by ↑|\font|, or it can be the predefined font
identifier called ↑|\nullfont|. When a \<countdef token> is used as an
internal integer, it denotes the value of the corresponding ↑|\count|
register, and similar statements hold for \<dimendef token>, \<skipdef
token>, \<muskipdef token>. When a \<chardef token> or \<mathchardef
token> is used as an internal integer, it denotes the value in the
↑|\chardef| or ↑|\mathchardef| itself. An ↑\<8-bit number> is a \<number>
whose value is between 0~and $2↑8-1=255$; a ↑\<7-bit number> is a
\<number> whose value is between 0~and $2↑7-1=127$; and so on. ↑↑\<15-bit
number> ↑↑\<4-bit number> ↑↑\<27-bit number>
\TeX\ allows |\spacefactor| to be an internal integer only in horizontal
modes; |\prevdepth| can be an internal dimension only in vertical modes;
|\lastskip| can be \<internal muglue> only in math mode when the current
math list ends with a muglue item; and |\lastskip| cannot be \<internal
glue> in such a case. When |\parshape| is used as an internal integer, it
denotes only the number of controlled lines, not their sizes or
indentations. The seven special dimensions |\pagetotal|, |\pagestretch|,
and so on are all zero when the current page contains no boxes, and
|\pagegoal| is |\maxdimen| at such times (see Chapter~15).
\smallskip
From the syntax rules just given, it's possible to deduce exactly what
happens to ↑{spaces} when they are in the vicinity of numerical quantities:
\TeX\ allows a \<number> or \<dimen> to be preceded by arbitrarily many
spaces, and to be followed by at most one space; however, there is no
optional space after a \<number> or \<dimen> that ends with an unexpandable
control sequence. For example, if \TeX\ sees `|\space\space24\space\space|' when
it is looking for a \<number>, it gobbles up the first three spaces, but
the fourth one survives; similarly, one space remains when `|24pt\space\space|'
and `|\dimen24\space\space|' and `|\pagegoal\space|' are treated as
\<dimen> values.
\ddangerexercise Is `|24\space\space pt|' a legal \<dimen>?
\answer Yes; any number of spaces can precede any keyword.
\ddangerexercise Is there any difference between `|+\baselineskip|',
`|- -\baselineskip|', and `|1\baselineskip|', when \TeX\ reads
them as \<glue>?
\answer The first two have the same meaning; but the third coerces
|\baselineskip| to a \<dimen> by suppressing the stretchability
and shrinkability that might be present.
\ddangerexercise What \<glue> results from |"DD DDPLUS2,5 \spacefactor\space|,
assuming the conventions of plain \TeX, when |\spacefactor| equals 1000?
\answer The natural width is $221\rm\,dd$ (which \TeX\ rounds to
$15497423\rm\,sp$ and displays as |236.47191pt|).
The stretchability is $2500\rm\,sp$, since an
internal integer is coerced to a dimension when it appears as an
↑↑{coerce <number> to <dimen>}
\<internal unit>. The shrinkability is zero. Notice that the final |\space|
is swallowed up as part of the optional ↑{spaces} of the \<shrink> part
in the syntax for \<glue>. \ (If |PLUS| had been |MINUS|, the final |\space|
would {\sl not\/} have been part of this \<glue>!)
Let's turn now to \TeX's ↑{parameters}, which the previous chapters have
introduced one at a time; it will be convenient to assemble them
all together. An ↑\<integer parameter> is one of the following tokens:
\begindisplay\belowdisplayskip=3pt plus 6pt \abovedisplayskip=3pt plus 1pt%
\openup.15pt
↑|\pretolerance|\quad(badness tolerance before hyphenation)\cr
↑|\tolerance|\quad(badness tolerance after hyphenation)\cr
↑|\hbadness|\quad(badness above which bad hboxes will be shown)\cr
↑|\vbadness|\quad(badness above which bad vboxes will be shown)\cr
↑|\linepenalty|\quad(amount added to badness of every line in a paragraph)\cr
↑|\hyphenpenalty|\quad(penalty for line break after discretionary hyphen)\cr
↑|\exhyphenpenalty|\quad(penalty for line break after explicit hyphen)\cr
↑|\binoppenalty|\quad(penalty for line break after binary operation)\cr
↑|\relpenalty|\quad(penalty for line break after math relation)\cr
↑|\clubpenalty|\quad(penalty for creating a club line at bottom of page)\cr
↑|\widowpenalty|\quad(penalty for creating a widow line at top of page)\cr
↑|\displaywidowpenalty|\quad(ditto, before a display)\cr
\noalign{\goodbreak}
↑|\brokenpenalty|\quad(penalty for page break after a hyphenated line)\cr
↑|\predisplaypenalty|\quad(penalty for page break just before a display)\cr
↑|\postdisplaypenalty|\quad(penalty for page break just after a display)\cr
↑|\interlinepenalty|\quad(additional penalty for page break between lines)\cr
↑|\floatingpenalty|\quad(penalty for insertions that are split)\cr
↑|\outputpenalty|\quad(penalty at the current page break)\cr
↑|\doublehyphendemerits|\quad(demerits for consecutive broken lines)\cr
↑|\finalhyphendemerits|\quad(demerits for a penultimate broken line)\cr
↑|\adjdemerits|\quad(demerits for adjacent incompatible lines)\cr
↑|\looseness|\quad(change to the number of lines in a paragraph)\cr
↑|\pausing|\quad(positive if pausing after each line is read from a file)\cr
↑|\tracingonline|\quad(positive if showing diagnostic info on the terminal)\cr
↑|\tracingmacros|\quad(positive if showing macros as they are expanded)\cr
↑|\tracingstats|\quad(positive if showing statistics about memory usage)\cr
↑|\tracingparagraphs|\quad(positive if showing line-break calculations)\cr
↑|\tracingpages|\quad(positive if showing page-break calculations)\cr
↑|\tracingoutput|\quad(positive if showing boxes that are shipped out)\cr
↑|\tracinglostchars|\quad(positive if showing characters not in the font)\cr
↑|\tracingcommands|\quad(positive if showing commands
before they are executed)\cr
↑|\tracingrestores|\quad(positive if showing deassignments when groups end)\cr
↑|\uchyph|\quad(positive if hyphenating words beginning with capital letters)\cr
↑|\globaldefs|\quad(nonzero if overriding |\global| specifications)\cr
↑|\defaulthyphenchar|\quad(↑|\hyphenchar| value when a font is loaded)\cr
↑|\defaultskewchar|\quad(↑|\skewchar| value when a font is loaded)\cr
↑|\escapechar|\quad(escape character in the output of
control sequence tokens)\cr
↑|\endlinechar|\quad(character placed at the right end of an input line)\cr
↑|\newlinechar|\quad(character that starts a new output line)\cr
↑|\maxdeadcycles|\quad(upper bound on |\deadcycles|)\cr
↑|\hangafter|\quad(hanging indentation changes after this many lines)\cr
↑|\fam|\quad(the current family number)\cr
↑|\mag|\quad(magnification ratio, times 1000)\cr
↑|\delimiterfactor|\quad(ratio for variable delimiters, times 1000)\cr
↑|\time|\quad(current time of day in minutes since midnight)\cr
↑|\day|\quad(current day of the month)\cr
↑|\month|\quad(current month of the year)\cr
↑|\year|\quad(current year of our Lord)\cr
↑|\showboxbreadth|\quad(items per level when boxes are shown)\cr
↑|\showboxdepth|\quad(maximum level when boxes are shown)\cr
\enddisplay
The first few of these parameters have values in units of ``badness'' and
``penalties'' that affect line breaking and page breaking. Then come
demerit-oriented parameters; demerits are essentially given in units of
``badness squared,'' so those parameters tend to have larger values.
By contrast, the next few parameters (|\looseness|, |\pausing|, etc.)\
generally have quite small values (either $-1$ or 0 or 1 or~2).
Miscellaneous parameters complete the set. \TeX\ computes the date and time
when it begins a job, if the operating system provides such information; but
afterwards the clock does not keep ticking: The user can change |\time|
just like any ordinary parameter. Chapter~10 points out that |\mag| must
not be changed after \TeX\ is committed to a particular magnification.
\goodbreak\noindent
A ↑\<dimen parameter> is one of the following:
\begindisplay\openup.15pt
↑|\hfuzz|\quad(maximum overrun before overfull hbox messages occur)\cr
↑|\vfuzz|\quad(maximum overrun before overfull vbox messages occur)\cr
↑|\overfullrule|\quad(width of rules appended to overfull boxes)\cr
↑|\hsize|\quad(line width in horizontal mode)\cr
↑|\vsize|\quad(page height in vertical mode)\cr
↑|\maxdepth|\quad(maximum depth of boxes on main pages)\cr
↑|\splitmaxdepth|\quad(maximum depth of boxes on split pages)\cr
↑|\boxmaxdepth|\quad(maximum depth of boxes on explicit pages)\cr
↑|\lineskiplimit|\quad(threshold where |\baselineskip| changes
to |\lineskip|)\cr
↑|\delimitershortfall|\quad(maximum space not covered by a delimiter)\cr
↑|\nulldelimiterspace|\quad(width of a null delimiter)\cr
↑|\scriptspace|\quad(extra space after subscript or superscript)\cr
↑|\mathsurround|\quad(kerning before and after math in text)\cr
↑|\predisplaysize|\quad(length of text preceding a display)\cr
↑|\displaywidth|\quad(length of line for displayed equation)\cr
↑|\displayindent|\quad(indentation of line for displayed equation)\cr
↑|\parindent|\quad(width of\/ |\indent|)\cr
↑|\hangindent|\quad(amount of hanging indentation)\cr
↑|\hoffset|\quad(horizontal offset in |\shipout|)\cr
↑|\voffset|\quad(vertical offset in |\shipout|)\cr
\enddisplay
And the possibilities for ↑\<glue parameter> are:
\begindisplay\openup.15pt
↑|\baselineskip|\quad(desired glue between baselines)\cr
↑|\lineskip|\quad(interline glue if\/ |\baselineskip| is unfeasible)\cr
↑|\parskip|\quad(extra glue just above paragraphs)\cr
↑|\abovedisplayskip|\quad(extra glue just above displays)\cr
↑|\abovedisplayshortskip|\quad(ditto, following short lines)\cr
↑|\belowdisplayskip|\quad(extra glue just below displays)\cr
↑|\belowdisplayshortskip|\quad(ditto, following short lines)\cr
↑|\leftskip|\quad(glue at left of justified lines)\cr
↑|\rightskip|\quad(glue at right of justified lines)\cr
↑|\topskip|\quad(glue at top of main pages)\cr
↑|\splittopskip|\quad(glue at top of split pages)\cr
↑|\tabskip|\quad(glue between aligned entries)\cr
↑|\spaceskip|\quad(glue between words, if nonzero)\cr
↑|\xspaceskip|\quad(glue between sentences, if nonzero)\cr
↑|\parfillskip|\quad(additional |\rightskip| at end of paragraphs)\cr
\enddisplay
Finally, there are three permissible ↑\<muglue parameter> tokens:
\begindisplay\openup.15pt
↑|\thinmuskip|\quad(thin space in math formulas)\cr
↑|\medmuskip|\quad(medium space in math formulas)\cr
↑|\thickmuskip|\quad(thick space in math formulas)\cr
\enddisplay
All of these quantities are explained in more detail somewhere else in
this book, and you can use Appendix~I to find out where.
\TeX\ also has parameters that are token lists. Such parameters do not
enter into the definitions of \<number> and such things, but we might as
well list them now so that our tabulation of parameters is complete.
A ↑\<token parameter> is any of:
\begindisplay\openup.15pt
↑|\output|\quad(the user's output routine)\cr
↑|\everypar|\quad(tokens to insert when a paragraph begins)\cr
↑|\everymath|\quad(tokens to insert when math in text begins)\cr
↑|\everydisplay|\quad(tokens to insert when display math begins)\cr
↑|\everyhbox|\quad(tokens to insert when an hbox begins)\cr
↑|\everyvbox|\quad(tokens to insert when a vbox begins)\cr
↑|\everyjob|\quad(tokens to insert when the job begins)\cr
↑|\everycr|\quad(tokens
to insert after every ↑|\cr| or nonredundant ↑|\crcr|)\cr
↑|\errhelp|\quad(tokens that supplement an |\errmessage|)\cr
\enddisplay
That makes a total of 97 parameters of all five kinds.
\ddangerexercise Explain how |\everyjob| can be non-null when a job begins.
\answer If it was non-null when a ↑|\dump| operation occurred. Here's
↑↑|\jobname|
a nontrivial example, which sets up ↑|\batchmode| and puts ↑|\end| at the
end of the input file:
\begintt
\everyjob={\batchmode\input\jobname\end}
\endtt
It's time now to return to our original goal, namely to study the commands
that are obeyed by \TeX's digestive organs. Many commands are
carried out in the same way regardless of the current mode. The most
important commands of this type are called {\sl↑{assignments}}, since
they assign new values to the meaning of control sequences or to \TeX's
internal quantities. For example, `|\def\a{a}|' and `|\parshape=1 5pt 100pt|'
and `|\advance\count20 by-1|' and `|\font\ff = cmff at 20pt|' are all
assignments, and they all have the same effect in all modes.
Assignment commands often include an~↑|=|~sign, ↑↑{equals sign}
but in all cases this sign is optional; you can leave it out if you
don't mind the fact that the resulting \TeX\ code might not look quite
like an assignment.
\beginsyntax
<assignment>\is<non-macro assignment>\alt<macro assignment>
<non-macro assignment>\is<simple assignment>
\alt↑|\global|<non-macro assignment>
<macro assignment>\is<definition>\alt<prefix><macro assignment>
<prefix>\is|\global|\alt↑|\long|\alt↑|\outer|
<equals>\is<optional spaces>\alt<optional spaces>\thinspace|=|$_{12}$
\endsyntax
This syntax shows that every assignment can be prefixed by |\global|, but
only macro-definition assignments are allowed to be prefixed by |\long|
or |\outer|. Incidentally, if the |\globaldefs| parameter is positive at the
time of the assignment, a prefix of\/ |\global| is automatically implied;
but if\/ ↑|\globaldefs| is negative at the time of the assignment, a prefix
of\/ |\global| is ignored. If\/ |\globaldefs| is zero (which it usually~is),
the appearance or nonappearance of\/ |\global| determines whether or not
a global assignment is made.
\beginsyntax
<definition>\is<def><control sequence><definition text>
<def>\is↑|\def|\alt↑|\gdef|\alt↑|\edef|\alt↑|\xdef|
<definition text>\is<parameter text><left brace><balanced text><right brace>
\endsyntax
Here ↑\<control sequence> denotes a token that is either a control sequence
or an active character; ↑\<left brace> and ↑\<right brace> are explicit
character tokens whose category codes are respectively of types 1 and~2.
The ↑\<parameter text> contains no \<left brace> or \<right brace> tokens,
and it obeys the rules of Chapter~20. All occurrences of \<left brace>
and \<right brace> tokens within the ↑\<balanced text> must be properly nested
like \hbox{parentheses}. A |\gdef| command is equivalent to |\global\def|,
and |\xdef| is equivalent to |\global\edef|. \TeX\ reads the
\<control sequence> and \<parameter text> tokens and the opening \<left brace>
without expanding them; it expands the \<balanced text>\allowbreak\<right
brace> tokens only in the case of\/ |\edef| and |\xdef|.
Several commands that we will study below have a syntax somewhat like
that of a definition, but the \<parameter text> is replaced by an
arbitrary sequence of spaces and `|\relax|' commands, and the
\<left brace> token can be implicit:
\beginsyntax
<filler>\is<optional spaces>\alt<filler>↑|\relax|<optional spaces>
<general text>\is<filler>|{|<balanced text><right brace>
\endsyntax
The main purpose of a \<general text> is to specify the \<balanced text>
inside.
Many different kinds of assignments are possible, but they fall into
comparatively few patterns, as indicated by the following syntax rules:
\beginsyntax
<simple assignment>\is<variable assignment>\alt<arithmetic>
\alt<code assignment>\alt<let assignment>\alt<shorthand definition>
\alt<fontdef token>\alt<family assignment>\alt<shape assignment>
\alt↑|\read|<number>[to]<optional spaces><control sequence>
\alt↑|\setbox|<8-bit number><equals><filler><box>
\alt<global assignment>
<variable assignment>\is<integer variable><equals><number>
\alt<dimen variable><equals><dimen>
\alt<glue variable><equals><glue>
\alt<muglue variable><equals><muglue>
\alt<token variable><equals><general text>
\alt<token variable><equals><filler><token variable>
<arithmetic>\is↑|\advance|<integer variable><optional {\tt by}><number>
\alt|\advance|<dimen variable><optional {\tt by}><dimen>
\alt|\advance|<glue variable><optional {\tt by}><glue>
\alt|\advance|<muglue variable><optional {\tt by}><muglue>
\alt↑|\multiply|<numeric variable><optional {\tt by}><number>
\alt↑|\divide|<numeric variable><optional {\tt by}><number>
<optional {\tt by}>\is[by]\alt\<optional spaces>
<integer variable>\is<integer parameter>\alt<countdef token>
\alt↑|\count|<8-bit number>
<dimen variable>\is<dimen parameter>\alt<dimendef token>
\alt↑|\dimen|<8-bit number>
<glue variable>\is<glue parameter>\alt<skipdef token>
\alt↑|\skip|<8-bit number>
<muglue variable>\is<muglue parameter>\alt<muskipdef token>
\alt↑|\muskip|<8-bit number>
<token variable>\is<token parameter>\alt<toksdef token>
\alt↑|\toks|<8-bit number>
<numeric variable>\is<integer variable>\alt<dimen variable>
\alt<glue variable>\alt<muglue variable>
<code assignment>\is<code name><7-bit number><equals><number>
<let assignment>\is↑|\futurelet|<control sequence><token><token>
\alt↑|\let|<control sequence><equals><one optional space><token>
<shorthand definition>\is↑|\chardef|<control sequence><equals><8-bit number>
\alt↑|\mathchardef|<control sequence><equals><15-bit number>
\alt<registerdef><control sequence><equals><8-bit number>
<registerdef>\is↑|\countdef|\alt↑|\dimendef|\alt↑|\skipdef|\alt%
↑|\muskipdef|\alt↑|\toksdef|
<family assignment>\is<family member><equals><font>
<shape assignment>\is↑|\parshape|<equals><number><shape dimensions>
\endsyntax
The \<number> at the end of a \<code assignment> must not be negative, except in
the case that a |\delcode| is being assigned. Furthermore, that \<number> should
be at most 15~for |\catcode|, 32768~for |\mathcode|, 127~for |\lccode| or
|\uccode|, 32767~for |\sfcode|, and $2↑{24}-1$~for |\delcode|. In a
\<shape assignment> for which the \<number> is $n$, the ↑\<shape dimensions>
are \<empty> if $n\le0$, otherwise they consist of $2n$ consecutive
occurrences of \<dimen>. \TeX\ does not expand tokens when it scans the
arguments of\/ |\let| and |\futurelet|.
\ddangerexercise We discussed the distinction between explicit and ↑{implicit
character tokens} earlier in this chapter. Explain how you can make the
control sequence |\cs| into an implicit space, using (a)~|\futurelet|,
(b)~|\let|.
\answer (a) |\def\\#1\\{}\futurelet\cs\\|\]|\\|. (b) |\def\\{\let\cs= }\\|\].
\ (There are many other solutions.)
All of the assignments mentioned so far will obey \TeX's grouping structure;
i.e., the changed quantities will be restored to their former values
when the current group ends, unless the change was global. The remaining
assignments are different, since they affect \TeX's global font tables
or hyphenation tables, or they affect certain control variables of such
↑↑{global parameters}
an intimate nature that grouping would be inappropriate. In all of the
following cases, the presence or absence of\/ |\global| as a prefix has no
effect.
\beginsyntax
<global assignment>\is<font assignment>
\alt<hyphenation assignment>
\alt<box size assignment>
\alt<interaction mode assignment>
\alt<intimate assignment>
<font assignment>\is↑|\font|<control sequence><equals><file name><at clause>
\alt↑|\fontdimen|<number><font><equals><dimen>
\alt↑|\hyphenchar|<font><equals><number>
\alt↑|\skewchar|<font><equals><number>
<at clause>\is[at]<dimen>\alt[scaled]<number>\alt<optional spaces>
<hyphenation assignment>\is↑|\hyphenation|<general text>
\alt↑|\patterns|<general text>
<box size assignment>\is<box dimension><8-bit number><equals><dimen>
<interaction mode assignment>\is↑|\errorstopmode|\alt↑|\scrollmode|
\alt↑|\nonstopmode|\alt↑|\batchmode|
<intimate assignment>\is<special integer><equals><number>
\alt<special dimen><equals><dimen>
\endsyntax
When a |\fontdimen| value is assigned, the \<number> must be positive and
not greater than the number of parameters in the font's metric information
file, unless that font information has just been loaded into \TeX's
memory; in the latter case, you are allowed to increase the number of
parameters (see Appendix~F\null). The \<special integer> and \<special
dimen> quantities were listed above when we discussed internal integers
and dimensions. When |\prevgraf| is set to a \<number>, the number must
not be negative.
The syntax for ↑\<file name> is not standard in \TeX, because different
operating systems have different conventions. You should ask your local
system wizards for details on just how they have decided to implement file
names. However, the following principles should hold universally:
A~\<file name> should consist of \<optional spaces> followed by explicit
character tokens (after expansion). A sequence of six or fewer ordinary
letters and/or digits followed by a space should be a file name that works
in essentially the same way on all installations of \TeX. Uppercase
letters are not considered equivalent to their lowercase counterparts in
file names; for example, if you refer to fonts |cmr10| and |CMR10|, \TeX\
will not notice any similarity between them, although it might input the
same font metric file for both fonts.
\TeX\ takes precautions so that constructions like `|\chardef\cs=10\cs|' and
`|\font\cs=name\cs|' won't expand the second |\cs| until
the assignments are done.
Our discussion of assignments is complete except that the |\setbox|
assignment involves a quantity called \<box> that has not yet been
defined. Here is its syntax:
\beginsyntax
<box>\is↑|\box|<8-bit number>\alt↑|\copy|<8-bit number>
\alt↑|\lastbox|\alt↑|\vsplit|<8-bit number>[to]<dimen>
\alt↑|\hbox|<box specification>|{|<horizontal mode material>|}|
\alt↑|\vbox|<box specification>|{|<vertical mode material>|}|
\alt↑|\vtop|<box specification>|{|<vertical mode material>|}|
<box specification>\is[to]<dimen><filler>
\alt[spread]<dimen><filler>\alt<filler>
\endsyntax
The |\lastbox| operation is not permitted in math modes, nor is it allowed
in vertical mode when the main vertical list has been entirely contributed
to the current page. But it is allowed in horizontal modes and in
internal vertical mode; in such modes it refers to (and removes) the
last item of the current list, provided that the last item is an hbox or~vbox.
The three last alternatives for a \<box> present us with a new situation:
The ↑\<horizontal mode material> in an |\hbox| and the
↑\<vertical mode material> in a |\vbox| can't simply be swallowed up
in one command like an \<8-bit number> or a \<dimen>; thousands of
commands may have to be executed before that box is constructed and
before the |\setbox| command can be completed.
Here's what really happens: A command like
\begindisplay
|\setbox|\<number>|=\hbox to|\<dimen>|{|\<horizontal mode material>|}|
\enddisplay
causes \TeX\ to evaluate the \<number> and the \<dimen>, and to put those
values on a ``stack'' for safe keeping. Then \TeX\ reads the `|{|' (which
stands for an explicit or implicit begin-group character, as explained
earlier), and this initiates a new level of grouping. At this point
\TeX\ enters restricted horizontal mode and proceeds to execute commands
in that mode. An arbitrarily complex box can now be constructed;
the fact that this box is eventually destined for a |\setbox| command
has no effect on \TeX's behavior while the box is being built. Eventually,
when the matching `|}|' appears, \TeX\ restores values that were
changed by assignments in the group just ended; then it packages the hbox
(using the size that was saved on the stack), and completes the
|\setbox| command, returning to the mode it was in at the time of
the |\setbox|.
\smallbreak
Let us now consider other commands that, like assignments, are
obeyed in basically the same way regardless of \TeX's current mode.
\def\\{\smallbreak\textindent{$\bull$}}
\\↑|\relax|.\enskip
This is an easy one: \TeX\ does nothing.
\\|}|.\enskip
This one is harder, because it depends on the current group. \TeX\ should
now be working on a group that began with |{|; and it knows why it
started that group. So it does the appropriate finishing actions, undoes
the effects of non-global assignments, and leaves the group.
At this point \TeX\ might leave its current mode and return to a mode that
was previously in effect.
\\↑|\begingroup|.\enskip
When \TeX\ sees this command, it enters a group that must be terminated
by |\endgroup|, not by |}|. The mode doesn't change.
\\↑|\endgroup|.\enskip
\TeX\ should currently be processing a group that began with |\begingroup|.
Quantities that were changed by non-global assignments in that group
are restored to their former values. \TeX\ leaves the group,
but stays in the same mode.
\\↑|\show|\stretch\<token>,
\stretch\stretch\stretch↑|\showbox|\stretch\<8-bit number>,
\stretch\stretch\stretch↑|\showlists|,
\stretch\stretch\stretch↑|\showthe|$\langle$internal quantity$\rangle$.\enskip
These commands are intended to help you figure out what \TeX\ thinks it
is doing. The tokens following |\showthe| should be anything that can
follow |\the|, as explained in Chapter~20.
\ddangerexercise Review the rules for what can follow |\the| in
Chapter~20, and construct a formal syntax that defines ↑\<internal
quantity> in a way that fits with the other syntax rules we have been
discussing.
\answer \<internal quantity>\is\<internal integer>\alt
\<internal dimen>\parbreak\qquad\alt\<internal glue>\alt\<internal muglue>\alt
\<internal nonnumeric>\parbreak \<internal nonnumeric>\is\<token
variable>\alt \<font>
\\↑|\shipout|\<box>.\enskip
After the \<box> is formed---possibly by constructing it explicitly and
changing modes during the construction, as explained for |\hbox| earlier---its
contents are sent to the ↑|dvi|~file (see Chapter~23).
\\↑|\ignorespaces|\stretch$\langle$optional spaces$\rangle$.
\TeX\ reads (and expands) tokens, doing nothing until reaching one that is
not a \<space token>.
\\↑|\afterassignment|\<token>.\enskip
The \<token> is saved in a special place; it will be inserted
back into the input just after the next assignment command has been
performed. An assignment need not follow immediately; if another
|\afterassignment| is performed before the next assignment, the second one
overrides the first. If the next assignment is a |\setbox|, and if the
assigned \<box> is |\hbox| or |\vbox| or |\vtop|, the \<token> will be
inserted just after the |{| in the box construction, not after the |}|;
it will also come just before any tokens inserted by ↑|\everyhbox| or
↑|\everyvbox|.
\\↑|\aftergroup|\<token>.\enskip
The \<token> is saved on \TeX's stack; it will be inserted back into the
input just after the current group has been completed and its local
assignments have been undone. If several |\aftergroup| commands occur
in the same group, the corresponding commands will be scanned in the
same order; for example, `|{\aftergroup\a\aftergroup\b}|' yields `|\a\b|'.
\\↑|\uppercase|\<general text>, ↑|\lowercase|\<general text>.\enskip
The \<balanced text> in the general text is converted to uppercase form
or to lowercase form using the |\uccode| or |\lccode| table,
as explained in Chapter~7; no expansion is done. Then \TeX\ will
read that \<balanced text> again.
\\↑|\message|\<general text>, ↑|\errmessage|\<general text>.\enskip
The balanced text (with expansion) is written on the user's terminal,
using the format of error messages in the case of\/ |\errmessage|.
In the latter case the ↑|\errhelp| tokens will be shown if they are nonempty
and if the user asks for help.
\\↑|\openin|\stretch$\langle$4-bit number$\rangle$\stretch\<equals>\stretch
\<filename>, \ ↑|\closein|\stretch$\langle$4-bit number$\rangle$.
These commands open or close the specified input stream, for use in
|\read| assignments as explained in Chapter~20.
\\|\immediate\openout|\<4-bit number>\<equals>\<filename>\kern-.4pt,
|\immediate\closeout|\allowbreak\<4-bit number>.\enskip ↑↑|\immediate|
The specified input stream is opened or closed, for use in |\write|
commands, as explained in Chapter~21.
\\|\immediate\write|\<number>\<general text>.\enskip
The balanced text is written on the file that corresponds to the
specified stream number, provided that such a file is open. Otherwise it
is written on the user's terminal and on the log file. \ (See Chapter~21;
the terminal is omitted if the \<number> is negative.)
\medbreak
That completes the list of mode-independent commands, i.e., the commands
that do not directly affect the lists that \TeX\ is building. When \TeX\
is in vertical mode or internal vertical mode, it is constructing a
vertical list; when \TeX\ is in horizontal mode or restricted horizontal
mode, it is constructing a horizontal list; when \TeX\ is in math mode
or display math mode, it is constructing---guess what---a math list. In
each of these cases we can speak of the ``current list''; and there are
some commands that operate in essentially the same way, regardless of the
mode, except that they deal with different sorts of lists:
\\↑|\openout|\<4-bit number>\<equals>\<filename>,
↑|\closeout|\<4-bit number>,
↑|\write|\allowbreak\<number>\<general text>.\enskip
These commands are recorded into a ``whatsit'' item, which is appended to
the current list. The command will be performed later, during any
|\shipout| that applies to this list, unless the list is part of
a box inside ↑{leaders}.
\\↑|\special|\<general text>.\enskip
The balanced text is expanded and put into a ``whatsit'' item, which is
appended to the current list. The text will eventually appear in the
↑|dvi|~file as an instruction to subsequent software (see Chapter~21).
\\↑|\penalty|\<number>.\enskip
A penalty item carrying the specified number is appended to the current list.
In vertical mode, \TeX\ also exercises the page builder (see~below).
\\↑|\kern|\<dimen>, ↑|\mkern|\<mudimen>.\enskip
A kern item carrying the specified dimension is appended to the current list.
In vertical modes this denotes a vertical space; otherwise it denotes a
horizontal space. An |\mkern| is allowed only in math modes.
\\↑|\unpenalty|, ↑|\unkern|, ↑|\unskip|.\enskip
If the last item on the current list is respectively of type penalty,
kern, or glue (possibly including ↑{leaders}), that item is removed from
the list. However, like |\lastbox|, these commands are not permitted in
vertical mode if the main vertical list-so-far has been entirely contributed
to the current page, since \TeX\ never removes items from the current page.
\\↑|\mark|\<general text>.\enskip
The balanced text is expanded and put into a mark item, which is appended to
the current list. The text may eventually become the replacement text
for ↑|\topmark|, ↑|\firstmark|, ↑|\botmark|, ↑|\splitfirstmark|, and/or
↑|\splitbotmark|, if this mark item ever gets into a vertical list. \ (Mark
items can appear in horizontal lists and math lists, but they have no
effect until they ``migrate'' out of their list. The ↑{migration process}
is discussed below and in Chapter~25.)
\\↑|\insert|\<8-bit number>\<filler>|{|\<vertical mode material>|}|;
the \<8-bit number> must not be~255. \ The `|{|' causes \TeX\ to enter
internal vertical mode and a new level of grouping. When the matching~`|}|'
is sensed, the vertical list is put into an insertion item that is
appended to the current list using the values of\/ ↑|\splittopskip|,
↑|\splitmaxdepth|, and ↑|\floatingpenalty| that were current in the group
just ended. \ (See Chapter~15.) \ This insertion item leads ultimately to
a page insertion only if it appears in \TeX's main vertical list, so it
will have to ``↑{migrate}'' there if it starts out in a horizontal list or
a math list. \TeX\ also exercises the page builder (see below), after an
|\insert| has been appended in vertical~mode.
\\↑|\vadjust|\<filler>|{|\<vertical mode material>|}|.\enskip
This is similar to |\insert|; the constructed vertical list goes into an
adjustment item that is appended to the current list. However,
|\vadjust| is not allowed in vertical modes. When an adjustment item
migrates from a horizontal list to a vertical list, the vertical list
inside the adjustment item is ``unwrapped'' and put directly into
the enclosing list.
\medbreak
\centerline{$*\qquad*\qquad*$}
\medskip\noindent
Almost everything we have discussed so far in this chapter could equally
well have appeared in a chapter entitled ``Summary of Horizontal Mode''
or a chapter entitled ``Summary of Math Mode,'' because \TeX\ treats
all of the commands considered so far in essentially the same way
regardless of the current mode. Chapters 25 and~26 are going to be
a lot shorter than the present one, since it will be unnecessary
to repeat all of the mode-independent rules.
But now we come to commands that are mode-dependent;
we shall conclude this chapter by discussing what \TeX\ does with the
remaining commands, when in vertical mode or internal vertical mode.
One of the things characteristic of vertical mode is the page-building
operation described in Chapter~15. \TeX\ periodically takes material
that has been put on the main vertical list and moves it from the
``contribution list'' to the ``current page.'' At such times the output
routine might be invoked. We shall say that \TeX\ {\sl exercises
the ↑{page builder}\/} whenever it tries to empty the current
contribution list. The concept of contribution list exists only in
the outermost vertical mode, so nothing happens when \TeX\ exercises
the page builder in internal vertical mode.
Another thing characteristic of vertical modes is the ↑{interline glue}
that is inserted before boxes, based on the values of\/ |\prevdepth|
and ↑|\baselineskip| and ↑|\lineskip| and ↑|\lineskiplimit| as explained
in Chapter~12. If a command changes ↑|\prevdepth|, that fact is
specifically mentioned below. The |\prevdepth| is initially set to
$-1000\pt$, a special value that inhibits interline glue, whenever \TeX\
begins to form a vertical list, except in the case of\/ |\halign| and
|\noalign| when the interline glue conventions of the outer list continue
inside the inner one.
\\↑|\vskip|\<glue>, ↑|\vfil|, ↑|\vfill|, ↑|\vss|, ↑|\vfilneg|.\enskip
A glue item is appended to the current vertical list.
\\\<leaders>\<box or rule>\<vertical skip>.\enskip
Here ↑\<vertical skip> refers to one of the five glue-appending commands
just mentioned. The formal syntax for \<leaders> and for \<box or rule> is
\beginsyntax
<leaders>\is|\leaders|\alt|\cleaders|\alt|\xleaders|
<box or rule>\is<box>\alt<vertical rule>\alt<horizontal rule>
<vertical rule>\is|\vrule|<rule specification>
<horizontal rule>\is|\hrule|<rule specification>
<rule specification>\is<optional spaces>\alt<rule dimension><rule specification>
<rule dimension>\is[width]<dimen>\alt[height]<dimen>\alt[depth]<dimen>
\endsyntax
A glue item that produces ↑{leaders} is appended to the current list.
\\↑\<space token>.\enskip
Spaces have no effect in vertical modes.
\\↑\<box>.\enskip
The box is constructed, and if the result is void nothing happens.
Otherwise the current vertical list receives (1)~interline glue, followed by
(2)~the new box, followed by (3)~vertical material that ↑{migrates} out of the
new box (if the \<box> was an ↑|\hbox| command). Then ↑|\prevdepth| is
set to the new box's depth, and \TeX\ exercises the page builder.
\\↑|\moveleft|\<dimen>\<box>, ↑|\moveright|\<dimen>\<box>.\enskip
This acts exactly like an ordinary \<box> command, but the new box that
is appended to the vertical list is also shifted left or right by the
specified amount.
\\↑|\unvbox|\<8-bit number>, ↑|\unvcopy|\<8-bit number>.\enskip
If the specified box register is void, nothing happens. Otherwise that
register must contain a vbox. The vertical list inside that box is
appended to the current vertical list, without changing it in any way.
The value of\/ |\prevdepth| is not affected. The box register becomes void
after |\unvbox|, but it remains unchanged by |\unvcopy|.
\\\<horizontal rule>.\enskip
The specified ↑{rule} is appended to the current list. Then |\prevdepth|
is set to $-1000\pt$; this will prohibit interline glue when the next box
is appended to the list.
\\↑|\halign|\<box specification>|{|\<alignment material>|}|.\enskip
The ↑\<alignment material> consists of a preamble followed by zero or more
lines to be aligned; see Chapter~22. \TeX\ enters a new level of grouping,
represented by the `|{|' and `|}|', within which changes to ↑|\tabskip|
will be confined. The alignment material can also contain optional
occurrences of `↑|\noalign|\<filler>|{|\<vertical mode material>|}|'
between lines; this adds another level of grouping. \TeX\ operates in
internal vertical mode while it works on the material in |\noalign| groups
and when it appends lines of the alignment; the resulting internal
vertical list will be appended to the enclosing vertical list after the
alignment is completed, and the page builder will be exercised. The value
of\/ |\prevdepth| at the time of the |\halign| is used at the beginning of
the internal vertical list, and the final value of\/ |\prevdepth| is carried
to the enclosing vertical list when the alignment is completed, so that the
interline glue is calculated properly at the beginning and end of the
alignment. \TeX\ also enters an additional level of grouping when it
works on each individual entry of the alignment, during which time it acts
in restricted horizontal mode; the individual entries will be hboxed as
part of the final alignment, and their vertical material will ↑{migrate}
to the enclosing vertical list. The commands |\noalign|, ↑|\omit|,
↑|\span|, ↑|\cr|, ↑|\crcr|, and |&| (where |&| denotes an explicit or
implicit character of category~4) are intercepted by the alignment
process, enroute to \TeX's stomach, so they will not appear as commands in
the stomach unless \TeX\ has lost track of what alignment they belong to.
\\↑|\indent|.\enskip
The ↑|\parskip| glue is appended to the current list, unless \TeX\ is
in internal vertical mode and the current list is empty.
Then \TeX\ enters unrestricted horizontal mode, starting the horizontal
list with an empty hbox whose width is ↑|\parindent|. The ↑|\everypar|
tokens are inserted into \TeX's input. The page builder is~exercised.
When the paragraph is eventually completed, horizontal mode will come to
an end as described in Chapter~25.
\\↑|\noindent|.\enskip
This is exactly like |\indent|, except that \TeX\ starts out in horizontal
mode with an empty list instead of with an indentation.
\\↑|\par|.\enskip
The primitive |\par| command has no effect when \TeX\ is in vertical mode,
except that the page builder is exercised in case something is present
on the contribution list, and the paragraph shape parameters are cleared.
\\|{|.\enskip
A character token of category 1, or a control sequence like~|\bgroup|
that has been |\let| equal to such a character token, causes \TeX\ to
start a new level of ↑{grouping}. When such a group ends---with `|}|'---\TeX\
will undo the effects of non-global assignments without leaving whatever
mode it is in at that time.
\\Some commands are incompatible with vertical mode because they are
intrinsically horizontal. When the following commands appear in
vertical modes they cause \TeX\ to begin a ↑{new paragraph}:
\beginsyntax
<horizontal command>\is<letter>\alt<otherchar>\alt↑|\char|\alt<chardef token>
\alt↑|\unhbox|\alt↑|\unhcopy|\alt↑|\valign|\alt↑|\vrule|
\alt↑|\hskip|\alt↑|\hfil|\alt↑|\hfill|\alt↑|\hss|\alt↑|\hfilneg|
\alt↑|\accent|\alt↑|\discretionary|\alt↑|\-|\alt↑|\|\]\alt|$|
\endsyntax
Here \<letter> and \<otherchar> stand for explicit or implicit character
tokens of categories 11 and~12. If any of these tokens occurs as a
command in vertical mode or internal vertical mode, \TeX\ automatically
performs an |\indent| command as explained above. This leads into
horizontal mode with the |\everypar| tokens in the input, after
which \TeX\ will see the \<horizontal command> again.
\\↑|\end|.\enskip
This command is not allowed in internal vertical mode. In regular vertical
mode it terminates \TeX\ if the main vertical list is empty and
↑|\deadcycles=0|. Otherwise \TeX\ backs up the |\end| command so that it can
be read again; then it exercises the page builder, after appending a
box/glue/penalty combination that will force the output routine to act.
\ (See the end of Chapter~23.)
\\↑|\dump|.\enskip
(Allowed only in ↑|INITEX|, not in production versions of \TeX.) \
This command is treated exactly like |\end|, but it must not appear
inside a group. It outputs a format file that can be loaded into \TeX's
memory at comparatively high speed to restore the current status.
\\None of the above: If any other primitive command of \TeX\ occurs
in vertical mode, an error message will be given, and \TeX\ will try
to recover in a reasonable way. For example, if a superscript or
subscript symbol appears, or if any other inherently mathematical
command is given, \TeX\ will try to insert a `|$|' (which will start a
paragraph and enter math mode). On the other hand if a totally
misplaced token like ↑|\endcsname| or |\omit| or |\eqno| or |#| appears
in vertical mode, \TeX\ will simply ignore~it, after reporting
the error. You might enjoy trying to type some really stupid input,
just to see what happens. \ (Say `|\tracingall|' first, as explained
in Chapter~27, in order to get maximum information.)
\endchapter
The first and most striking feature is the Verticality of composition,
as opposed to the Horizontality of all anterior structural modes.
\author COCKBURN ↑{MUIR}, {\sl Pagan or Christian?\/} (1860) % p61
\bigskip
Sometimes when I have finished a book I give a summary of the whole of it.
\author ROBERT WILLIAM ↑{DALE}, {\sl Nine Lectures on Preaching} (1878)
% viii.231
\eject